Read the metadata file from a yaml format. This function checks for existance of the metadata file and its content. In particular, within the yaml file matches the following strings:
path Path to the data. More than one path is allowed.
dateTime Date and time, usually of the SDTM data creation.
When printing the metadata in Rmd document, there is the possibility to add
the date and time of the report generation.
datasetInfo General information about the data sets.
String of path to file. Currently only one file path is supported. If more than one paths are provided, a warning will be printed and the first path will be used.
Named vector to rename the final output when printed in Rmd. The renaming happens only if the metadata info are printed in Rmd and not in the console.
Note that the input names do not necessarly have to match the exact names. For instance, the user can also write "dataTimeMySDTMData", and the function will parse for existance of the string "dataTime".
A list of:
summaryInfo Information extracted from the inputs
datasetInfo Information extracted from
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# Create temporary yaml file tmpdir <- tempdir() library(yaml) tmpYamlFile <- tempfile( pattern = "file", tmpdir = tempdir(), fileext = ".yml" ) listArgs <- list( pathSDTMs = "path/To/SDTM", pathSDTMReformat = "path/To/SDTMReformat", dateTime = "20200101", datasetInfo = list( list( column1 = "ex.xpt", column2 = "20200101" ), list( column1 = "sl.xpt", column2 = "20200101", column3 = "OK" ) ) ) write_yaml( listArgs, file = tmpYamlFile ) # Run metadata # Note: the 'datasetInfo' can also contain empty elements getMetadata(filePath = tmpYamlFile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.