getAvailable: Checks consistency of the data frame 'dsList'.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/functions.R

Description

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

Usage

1
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.

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.

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.

Author(s)

Petr Savicky

See Also

readMLData.

Examples

1
2
3
4
  pathData <- getPath("exampleData")
  pathDescription <- getPath("exampleDescription")
  dsList <- prepareDSList(pathData, pathDescription)
  getAvailable(dsList)

readMLData documentation built on May 29, 2017, 9:28 p.m.