This function creates an object of class fhir_style.
It contains the three elements sep, brackets and rm_empty_cols. See Details.
fhir_style(sep = " ", brackets = character(), rm_empty_cols = FALSE)A character vector of length one to separate pasted multiple entries. Defaults to " "
A character vector of length two defining the brackets surrounding indices for multiple entries, e.g. c( "<", ">").
If this is empty (i.e. character of length zero, the default) or 'NULL', no indices will be added to multiple entries. If it is a character
vector of length one, it will be recycled to length two, i.e. "|" will become c("|", "|").
Empty strings ("") are not allowed.
A logical vector of length one. Remove empty columns? Defaults to FALSE.
A fhir_style object
A fhir_style object is part of a '>fhir_table_description which in turn is part of a '>fhir_design and
ultimately used in fhir_crack(). A fhir_style object contains three elements:
sep: A string defining the separator used to separate multiple entries for the same element in a FHIR resource,
e.g. multiple address/city elements in a Patient resource.
brackets: A character vector of length two defining the brackets surrounding indices for multiple entries, e.g. c( "<", ">").
If this is empty (i.e. character of length 0, the default), no indices will be added to multiple entries.
Empty strings ("") are not allowed.
rm_empty_cols: A logical scalar defining whether or not to remove empty columns after cracking. Empty columns arise when you
try to extract an element that doesn't appear in any of the resources.
A fhir_style object looks for example like this:
sep: ' ' brackets: '[' ']' rm_empty_cols: FALSE
# NOT RUN {
fhir_style(sep = " ",
brackets = c("[", "]"),
rm_empty_cols = TRUE)
# }
Run the code above in your browser using DataLab