Comments (8)
Please review the documentation of each exported dataset. Although the exported datasets live in data/, their documentation lives in R/data.R. You seem to have already written some useful information that now lives in data-raw/data.Rmd. I suggest you remove duplication: Document each dataset in R/data.R and then simply cite that documentation elsewhere. For example, if in data-raw/data.Rmd you want to provide details about the dataset equations
, don't write those details directly; instead point to the help file of equations
by writing "see ?equations
". If this is unclear, let me know.
You may edit the skeleton that I wrote; later I can edit your work to apply roxygen2 syntax (which is the easiest way to create R help-files). FYI, here is a short explanation about how to document data -- althought it is a little out of date and now writing documentation is much easier because roxygen2 supports rmarkdown syntax (see this article).
You will notice that I documented each dataset
and its correspoinding dataset_metadata
in way that makes them appear in the same help-file. That way a single help file (accessed with any of ?dataset
or ?dataset_metadata
) explains what those two closely related datasets mean. The approach I am using uses the roxygen2 tags @name
and @rdname
; you can find more information about this approach here (although it refers to functions and not datasets, it works in the same way for both).
from allodb.
Here are some resources for inspiration about how to document datasets.
# Comes by default with R
?datasets::airquality
# install.packages("ggplot2")
?ggplot2::diamonds
install.packages("gapminder")
?gapminder::gapminder
# To see other datasets in the gapminder package type gampinder:: and then hit tab
from allodb.
Just tried to improve documentation but got stuck with my lack of skills (ie. how to built a table that will go under 'Format' when calling ?equations...)..We can work on this later.
from allodb.
There is the roxygen tag @format
. IT would look like this:
#' @format
#' stuff
But I haven't used @format
a lot so I'm unsure what you can and can't do in it. Can I see the table you want to add?
from allodb.
I want equation_metadata
to look like the table in ?datasets::airquality when using the help file for ?equation
I tried something in commit 1cafffb, but nothing happened
from allodb.
#' Tables of allometric equations and associated metadata for ForestGEO sites.
#'
#' A dataset of best available allometry equations to calculate AGB per species
#' per ForestGEO site:
#' * `equations`: Table of allometric equations.
#' * `equations_metadata`: Table of metadata of `equations`.
#'
#' @details
#' A data frame with 154 observations on 6 variables.
#' @details
#' ```
#' [,1] Ozone numeric Ozone (ppb)
#' [,2] Solar.R numeric Solar R (lang)
#' [,3] Wind numeric Wind (mph)
#' [,4] Temp numeric Temperature (degrees F)
#' [,5] Month numeric Month (1--12)
#' [,6] Day numeric Day of month (1--31)
#' ```
"equations"
#' @rdname equations
"equations_metadata"
from allodb.
I'll push tihis one.
#' Tables of allometric equations and associated metadata for ForestGEO sites.
#'
#' A dataset of best available allometry equations to calculate AGB per species
#' per ForestGEO site:
#' * `equations`: Table of allometric equations.
#' * `equations_metadata`: Table of metadata of `equations`.
#'
#' @format
#' A data frame with 154 observations on 6 variables.
#' ```
#' [,1] Ozone numeric Ozone (ppb)
#' [,2] Solar.R numeric Solar R (lang)
#' [,3] Wind numeric Wind (mph)
#' [,4] Temp numeric Temperature (degrees F)
#' [,5] Month numeric Month (1--12)
#' [,6] Day numeric Day of month (1--31)
#' ```
"equations"
from allodb.
Closing (finally!) because all functions and datasets have been documented
from allodb.
Related Issues (20)
- Replace data.frame() with tibble()
- When calling stop() use call. = FALSE
- some commits not showing
- Increase test coverage
- Tidy allodb::equations in advance, not in new_equaions()
- Prune data-raw/ HOT 1
- Remember to review FIXME and TODO
- Simplify new_equations()
- Ensure error messages wrap nicely
- Remove needless calls to print() in examples
- Use simpler markdown syntax, e.g. replace \pkg{allodb} with *allodb*
- Review punctuation of helpfiles (title and other sections)
- Use simple comments to follow tidyverse styleguide "# blah" not "## blah"
- Reserve return() for early returns (tidyverse styleguide)
- Remove redundant reference to allodb
- Remove duplication in documentation
- Replace references to `f()` with [f()].
- Document default vaules in signature, not in `@param` or elsewhere
- If `coords` has wrong dimensions `get_biomass()` should throw an error HOT 2
- Support for the component ratio method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allodb.