roxygen
comments (#'
)DESCRIPTION
devtools::document()
ctrl
/cmd
+ shift
+ B
R/crs_nimble.R
as a template to modify #'
are used for documentation via the roxygen2
package: @export
is critical! It tells roxygen2
to add the function to NAMESPACE
and makes it accessable to users; even though I list it here first, it comes last in the roxygen
chunk. @param
is for descriptions of a functions arguments -> every argument should be listed here! @import
is, perhaps unsurprisingly so, for importing functions from other (non-base-R
) packages: dplyr::filter(...)
) @imported
ed functions don't need to be called explicitly, even though it's still advisable to do so in order to avoid conflicts (e.g. package:stats::filter
and package:dplyr::filter
) @returns
contains a description of what the function returns, but is not strictly necessary @examples
: it may contain what it says, but not necessarily @references
is not necessary, but if you have any, this would be the place to include them some_name.R
in the R/
folderplot_themes.R
, summary_functions.R
, etc.)Imports:
section of the DESCRIPTION
filedevtools::document()
and afterwards build the package (ctrl
/cmd
+ shift
+ B
) - Done!data/
usethis::use_data(name_of_data)
(e.g. usethis::use_data(mousetrack_typicality)
).rda
file - surprisingly again - into data/
and make it available by the name of the data-objectR/data.R
; the one already present should suffice as an example on how that looksR/data.R
as welldevtools::document()
and afterwards build the package (ctrl
/cmd
+ shift
+ B
)Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.