| DatasetLoader | R Documentation |
Wrapper class able to automatically create a
Dataset, HDDataset according to the input data.
new()Empty function used to initialize the object arguments in runtime.
DatasetLoader$new()
load()Stores the input source into a Dataset or
HDDataset type object.
DatasetLoader$load( filepath, header = TRUE, sep = ",", skip.lines = 0, normalize.names = FALSE, string.as.factor = FALSE, ignore.columns = NULL )
filepathThe name of the file which the data are to be read from.
Each row of the table appears as one line of the file. If it does not
contain an _absolute_ path, the file name is _relative_ to the current
working directory, 'getwd()'.
headerA logical value indicating whether the file contains
the names of the variables as its first line. If missing, the value is
determined from the file format: 'header' is set to 'TRUE'
if and only if the first row contains one fewer field than the number of
columns.
sepThe field separator character. Values on each line of the file are separated by this character.
skip.linesDefines the number of header lines should be skipped.
normalize.namesA logical value indicating whether the columns names should be automatically renamed to ensure R compatibility.
string.as.factorA logical value indicating if character columns should be converted to factors (default = FALSE).
ignore.columnsSpecify the columns from the input file that should be ignored.
A Dataset or HDDataset object.
Dataset, HDDataset
## Not run:
# Create Dataset Handler object.
loader <- DatasetLoader$new()
# Load input file.
data <- loader$load(filepath = system.file(file.path("examples",
"hcc-data-complete-balanced.csv"),
package = "D2MCS"),
header = T, normalize.names = T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.