Learn R Programming

tinyProject (version 0.6.1)

prMoveData: Move and delete data files.

Description

The functions can be used to programmatically move or delete data files.

Usage

prMoveData(name, newDir, subdir = ".")

prDeleteData(name, subdir = ".")

Arguments

name

Name of the data file one want to move or delete (without extension)

newDir

Subdirectory where to move a data file

subdir

Subdirectory of the data file. It can also be indicated directly in the name parameter.

See Also

prScript

Examples

Run this code
# NOT RUN {
projectPath <- file.path(tempdir(), "test")
prInit(projectPath)

x <- rnorm(100)

prSave(x)
list.files(projectPath, recursive = TRUE, include.dirs = TRUE)

prMoveData(x, "testdir")
list.files(projectPath, recursive = TRUE, include.dirs = TRUE)

prDeleteData("testdir/x")
list.files(projectPath, recursive = TRUE, include.dirs = TRUE)

# }

Run the code above in your browser using DataLab