View source: R/download_resources.R
fhir_load | R Documentation |
Reads all bundles stored as xml files from a directory.
fhir_load(directory, indices = NULL, pattern = "^[0-9]+\\.xml$")
directory |
A character vector of length one containing the path to the folder were the files are stored. |
indices |
A numeric vector of integers indicating which bundles from the specified directory should be loaded. Defaults to NULL meaning all bundles from the directory are loaded. |
pattern |
A character vector of length one with a regex expression defining the naming pattern of the xml files
to be read. Defaults to the regex expression matching file names as produced by |
A fhir_bundle_list.
#unserialize example bundle
bundles <- fhir_unserialize(medication_bundles)
length(bundles)
#save to temporary directory
dir <- tempdir()
fhir_save(bundles, directory = dir)
#load from temporary directory
loaded_bundles <- fhir_load(dir)
length(loaded_bundles)
#load only two, the second and the third bundle
loaded_bundles <- fhir_load(dir, indices = c(2,3))
length(loaded_bundles)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.