View source: R/load_reference.R
load_reference | R Documentation |
This function searches for references stored in the sysdata.dta
object in package pkg
. If refcode
is a reference
then
load_reference(
refcode = NULL,
element = c("all", "table", "index", "study"),
pkg = "centile",
verbose = FALSE
)
refcode |
String, code of a reference. Only the first element is loaded.
Alternatively, if |
element |
Keyword, either |
pkg |
The package containing the reference. The package must be loaded
and attached. The default |
verbose |
For more verbose output, set to |
The return value depends on the element
parameter.
element | Return value |
"all" | All stored information |
"table" | A tibble with reference values |
"index" | Numeric vector with index values |
"study" | Named character vector with study data |
# use a built-in reference
ref <- load_reference("who_2006_wgt_male_")
head(ref)
head(attr(ref, "study"))
# use verbose = TRUE to find out problems
ref <- load_reference("nl_1997_hgt_male_nl", verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.