| dsSearch | R Documentation |
dsList.The function allows string matching against some of the fields
"identification", "fullName", "dirName", "files" of the
structure describing the data sets.
dsSearch(dsList, id, searchField=c("identification", "fullName", "dirName", "files"),
searchType=c("exact", "prefix", "suffix", "anywhere"), caseSensitive=FALSE)
dsList |
Data frame as created by |
id |
Character of length one or numeric of length at most |
searchField |
Character. Name of a column in |
searchType |
Character. Type of search. |
caseSensitive |
Logical. Whether the search should be case sensitive. |
The parameter searchField determines, which column of dsList
is searched, parameters searchType and caseSensitive
influence the type of search. These three parameters are ignored, if
id is numeric.
Regular expressions are not used. Matching with searchType="exact"
is done with ==, searchType="prefix" and searchType="suffix"
are implemented using substr(), searchType="anywhere" is
implemented using grep(, fixed=TRUE).
Data frame containing the indices and identification of the matching data sets and the value of the search field, if applicable.
Petr Savicky
readMLData.
pathData <- getPath("exampleData")
pathDescription <- getPath("exampleDescription")
dsList <- prepareDSList(pathData, pathDescription)
dsSearch(dsList, "ident", searchField="fullName", searchType="anywhere")