Description Usage Arguments Value Examples
View source: R/pathGeneratorMovement.R
File movements in disk
1 | pathGeneratorMovement(fileName, suffix = NULL, destination = "", move = FALSE)
|
fileName |
File name(s) in a character vector. It must in the current work directory. Make sure file(s) exists. |
suffix |
(optional) A character string representingthe suffix of the file, or NULL. Default is NULL. |
destination |
(optional) The directory name if not doing file moving, or the directory path if doing file moving. Default is "". Make sure the destination exists. |
move |
(optional) A boolean. TRUE for file moving, FALSE for generating file path. Default is FALSE. |
If move = TRUE, return nothing, but the input file(s) are moved to the destination
If move = FALSE, return generated path(s)
1 2 3 4 5 6 7 8 9 10 11 12 | # move myFile.txt to C:/Users
cat("test", file = "myFile.txt")
pathGeneratorMovement(fileName = "myFile", suffix = ".txt",
destination = "C:/Users/new", move = TRUE)
pathGeneratorMovement(fileName = "myFile.txt",
destination = "C:/Users/new", move = TRUE)
# generate file path "C:/Users/new/myFile.txt".
pathGeneratorMovement(fileName = "myFile", suffix = ".txt",
destination = "/new", move = FALSE)
pathGeneratorMovement(fileName = "myFile.txt",
destination = "/new")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.