create_data | R Documentation |
Usually you have to create a variable first, and then call [usethis::use_data()] with the variable name as an argument and the package data will be created. This function just unifies that into one step, and allows automated naming with 'paste0()', unlike 'usethis::use_data()'. Change name from original hake::create_data_hake(), as will work for any data object. See 'data-raw/groundfish/hake.R' for example use.
create_data(var, val)
var |
The variable name |
val |
The value for variable 'var' |
Nothing, creates package data. See 'usethis::use_data()'.
Chris Grandin (help file added to by Andrew Edwards)
## Not run:
In data-raw/groundfish/hake.R see these lines (which allow `assess_yr` to
part of the data object, which `use_data()` does not):
create_data(paste0("hake_recruitment_", assess_yr),
get(paste0("hake_recruitment_", assess_yr)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.