View source: R/createRDBESDataObject.R
createRDBESDataObject | R Documentation |
This function lets you create an RDBES Data object in your current R environment.
createRDBESDataObject(
input = NULL,
listOfFileNames = NULL,
castToCorrectDataTypes = TRUE,
verbose = FALSE,
...
)
input |
Strings or |
listOfFileNames |
|
castToCorrectDataTypes |
Logical. If |
verbose |
(Optional) Set to TRUE if you want informative text printed out, or FALSE if you don't. The default is FALSE. |
... |
parameters passed to validateRDBESDataObject
if input is list of data frames e.g. |
The input
should be either:
A zip
file downloaded from RDBES (or multiple zip files if you want to include or overwrite tables, for example CL and CE data). NOTE: Only the downloaded
RDBES data with Table data format with ids is loaded by this function and not the uploaded format.
A folder containing csv
files downloaded from RDBES (e.g. the unzipped file), or any set of csv files of the RDBES tables.
A list
of data frames in the current environment representing different tables in the hierarchy.
A NULL
input will return and empty RDBES data object
ZIP file inputs
This input
should be a path to a zip file downloaded from RDBES. Multiple
zip files can be entered if you want to include additional tables, for
example CL and CE. E.g. 'input = c("path/to/H1.zip", "path/to/CL.zip"). If
any tables in the first input are overwritten by other inputs a warning is
given. You should not input different hierarchy files; this function will not
combine them.
CSV file inputs
This input
should be a path to a folder of csv
files. These can be the
csv
files downloaded from RDBES (e.g. an unzipped hierarchy), or any set
of csv files containing RDBES tables. If the files do not have the default
RDBES name (e.g. 'Design.csv') the listOfFileNames
input can by used to
specify the file names e.g. list("DE" = "DE.csv", "SD" = "SD.csv", etc.)
.
List of data frames inputs
This input
should be a list
object containing data frames (or
data.tables) for each table in your hierarchy. They should be named with the
appropriate 2-letter code (DE
, SD
, etc.). Columns within these tables
will be renamed to the RDBES model documentation 'R name'. Note if you choose
to create an RDBESDAtaObject
from local data frames these may have not
passed the data integrity checks performed when you upload to RDBES!
NULL inputs
This input
produces an empty RDBESDataObject
, i.e. all tables with
correct data classes but the tables will be empty.
A RDBESDataObject
myEmptyRDBESObject <- createRDBESDataObject(input = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.