ices-eg / WK_RDBES

3 stars 6 forks source link

**Document functions using as minimum David's roxygen2 template** #52

Open nmprista opened 3 years ago

nmprista commented 3 years ago

' Minimum Documentation Example

'

' See the file "./tests/testthat/test-exampleFunction.R"

' for defining expected input and output

'

' @param stringX first string

' @param stringY second string

'

' @return The stringX and stringY pasted together

'

' @examples

' exampleFunction("A", "B")

exampleFunction <- function(stringX, stringY) { returnString <- paste(stringX, stringY) returnString }

nmprista commented 3 years ago

there’s more information available at https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html

There’s an example of using roxygen2 in RStudio at https://combine-australia.github.io/r-pkg-dev/documenting-functions.html