desc_from_comments | R Documentation |
A slightly more generic approach to getting model descriptions.
desc_from_comments(
xpdb,
start_check = ".*description",
maxlines = 5,
remove = paste0(start_check, ":\\s*"),
extra_proc = c,
collapse = " "
)
xpdb |
< |
start_check |
Regular expression used to mark start of description. This is tested case-insensitively. |
maxlines |
If the number of lines after description to the first code block is more than 1, this allows a limit. |
remove |
By default, the start check and a colon, with optional whitespace. A regex. |
extra_proc |
Any extra processing that might be desired prior to collapsing the description lines. This should be a vectorized function. |
collapse |
Character to use when collapsing multiple lines. |
The description-updated <xpose_data
) object
set_prop()
# This has a description, but it's not visible by default
pheno_base
# It can be added with the following
pheno_base %>%
desc_from_comments()
# Extra processing for preference can also implemented
pheno_base %>%
desc_from_comments(extra_proc = tolower)
# If a run label ($PROB) would make a good description, use the
# following instead:
pkpd_m3 %>%
set_prop(descr=get_prop(pkpd_m3,"label"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.