Learn R Programming

readMLData (version 0.9-7)

getAvailable: Checks consistency of the data frame dsList.

Description

Checks whether all the files of a specified data set are accesible in a local directory.

Usage

getAvailable(dsList, id=NULL, asLogical=FALSE)

Arguments

dsList
Data frame as created by prepareDSList().
id
Character or numeric vector. A character vector should contain names matching the names dsList$identification. Numeric vector should consist of the indices of the rows in dsList corresponding to the data set. If id=NULL, then all data sets are checked.
asLogical
Logical, whether the output should be a logical vector of the same length as id or a character vector containing the identification of the available data sets.

Value

Logical vector of the length length(id) specifying for each component of id the result of the check or a character vector containing the identification of the available data sets.

Details

The test is not completely reliable, since it only verifies that the files with the required file name are accessible. If the files require some transformations after download and these are not performed, the data set is still reported as available. The test uses file names specified in contents.xml file. If these names are by mistake different from the files actually read in the reading scripts, then the test may also yield an incorrect result.

See Also

readMLData.

Examples

Run this code
  pathData <- getPath("exampleData")
  pathDescription <- getPath("exampleDescription")
  dsList <- prepareDSList(pathData, pathDescription)
  getAvailable(dsList)

Run the code above in your browser using DataLab