Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #11

Open
rposn opened this issue May 8, 2015 · 0 comments
Open

Documentation #11

rposn opened this issue May 8, 2015 · 0 comments

Comments

@rposn
Copy link
Contributor

rposn commented May 8, 2015

To improve the documentation of the "climObj" methods I suggest the use of the "roxygen2" package. It allows making comments inline while coding in R. Once you have the inline comments, you just have to run the command: devtools::document(). Then the roxygen will create the help files (.Rd files) automatically.

More info:
http://r-pkgs.had.co.nz/man.html#man-classes

As an example:

' @title climate2

' @name climate

' @export

' @field climate_data_object list. A list of climate_data objects. Each object

' Include all information necessary to use the methods described in the Reference Class.

' @field used_data_objects list. A list of extra climate_data objects, created during use

' @field meta_data list. Any information about the climate object. e.g. "name"

' @description

' Defining the reference class "climate"

' This reference class can contain multiple climate_data objects

' The fields are the properties every climate_data object will have.

climate <- setRefClass("climate",
fields = list(climate_data_objects = "list", used_data_objects = "list",
meta_data = "list")
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant