Description Usage Arguments Details Value See Also Examples
These functions retrieve or save the categories table to/from the META table (which is inside the CALIBERcodelists namespace), or retrieve the categories table from a codelist.
1 2 3 4 5 6 | retrieveCategories(codelist = NULL)
saveCategories(numbers, shortnames = NULL, descriptions = NULL,
cattable = NULL, codelist = NULL)
addCategory(number, shortname, description = "",
codelist = NULL)
removeUnusedCategories(codelist = NULL)
|
codelist |
codelist to retrieve categories from, or save/retrieve to/from META if NULL. |
numbers |
integer vector of category numbers for the entire categories table |
shortnames |
character vector of short category descriptions for the entire categories table |
descriptions |
character vector of full category descriptions for the entire categories table |
cattable |
a data.table containing the new categories table with columns:
category, shortname, description (i.e. in the same format as returned by |
number |
a single new category number |
shortname |
character vector of a new category shortname to add |
description |
character vector of a new full category description to add |
saveCategories
saves the categories to META, in the form of three strings which are elements in the 'value' column alongside the 'item' entries: category, shortname and description (see META
).
removeUnusedCategories
removes unused category levels from a codelist, or from META if no codelist is given.
retrieveCategories
returns a data.table containing the category numbers, shortnames and descriptions. saveCategories
invisibly returns the subset of META containing the category table.
removeUnusedCategories
invisibly returns the modified codelist or the subset of META containing the category table.
1 2 3 4 5 | retrieveCategories()
saveCategories(numbers=c(1, 2),
shortnames=c('SA', 'UA'),
descriptions=c('Stable angina', 'Unstable angina'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.