| dsRead {readMLData} | R Documentation |
Loading machine learning data from a directory tree using a unified interface.
Description
The function allows to read data sets included in the description
in the data frame dsList into R environment using a unified interface.
Usage
dsRead(dsList, id, responseName = NULL, originalNames=TRUE,
deleteUnused=TRUE, keepContents=FALSE)
Arguments
dsList |
Data frame as created by |
id |
Name of the data set in |
responseName |
Character. The required name of the response column in the output data frame created from the data set. |
originalNames |
If TRUE, the original names of columns are used, if they are present in the description XML file. |
deleteUnused |
Logical. Controls, whether the columns containing case labels or other columns not suitable as attributes, are removed from the data. |
keepContents |
Logical. If |
Details
The function uses dsList$avaiable to determine, whether the files for
the required data set is present in the local directory dsList$pathData.
If not, a corresponding error message is printed. See prepareDSList()
and getAvailable().
Value
A data frame containing the required data set, possibly transformed according
to the setting of the parameters responseName, originalNames, deleteUnused.
If an error occurred, the function outputs NULL.
Author(s)
Petr Savicky
See Also
readMLData, prepareDSList, getAvailable.
Examples
pathData <- getPath("exampleData")
pathDescription <- getPath("exampleDescription")
dsList <- prepareDSList(pathData, pathDescription)
dat <- dsRead(dsList, "glass")
dim(dat)