Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rmdir

Delete a folder


Description

Like rmdir in a file system, this function removes a folder. Unlike the file-system version, it does not require the folders to be empty.

Usage

rmdir(x, path)

Arguments

x

A CrunchDataset or Folder (VariableFolder or ProjectFolder)

path

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, configurable via options(crunch.delimiter)). The path is interpreted as relative to the location of the folder x (when x is a dataset, that means the root, top-level folder). path may also be a Folder object.

Value

NULL

See Also

mv() to move entities to a folder; cd() to select a folder; file.remove() if you literally want to delete a directory from your local file system, which rmdir() does not do

Examples

## Not run: 
ds <- loadDataset("Example survey")
rmdir(ds, "Demographics")
# Or with %>%
require(magrittr)
ds <- ds %>%
    rmdir("Demographics")

## End(Not run)

crunch

Crunch.io Data Tools

v1.28.0
LGPL (>= 3)
Authors
Greg Freedman Ellis [aut, cre], Jonathan Keane [aut], Mike Malecki [aut], Neal Richardson [aut], Gordon Shotwell [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.