Find and move entities to a new folder

folder(x)

folder(x) <- value

Arguments

x

For folder, a Variable to find. For folder assignment, a Variable, selection of variables in a Dataset, or any other object that can be moved to a folder.

value

For assignment, a character "path" to the folder: either a vector of nested folder names or a single string with nested folders separated by a delimiter ("/" default)

Value

folder returns the parent folder of x, or NULL if the x is the root level. folder<- returns the x input, having been moved to the requested location.

See also

Examples

if (FALSE) {
ds <- loadDataset("Example survey")
folder(ds$income) <- "Demographics/Economic"
folder(ds$income)
## [1] "Demographics"    "Economic"
}