Return cases IDs or names which a set of files belong to.

getCaseIds(fid = getFileIds(), nFiles = FALSE)

getCaseNames(caseId = getCaseIds(nFiles = FALSE))

getCases(fid, names = TRUE)

Arguments

fid

numeric vector, the file IDs.

names

logical.

nFiles

logical, return the number of files that belong to a case.

caseId

numeric vector, the case IDs.

Value

getCaseIds returns a data frame of two columns when nFiles is TRUE, and a numeric vector when FALSE.

getCaseNames returns a character vector or NULL if no cases are associated with the file IDs.

getNames returns the names of cases when names is TRUE, id of files when FALSE.

Details

getCaseIds returns the case IDs which a file belongs to given the file IDs. getCaseNames returns the case Names given the case IDs. getCases returns the case Names or IDs depending on the argument of names. It is a wrapper of getCaseIds and getCaseNames.

See also

Examples

if (FALSE) { getCaseNames(getCaseIds(getFileIds("filecategory"))) }