if (interactive() && requireNamespace("EBImage")) {
library(pliman)
# get file name, directory and extension
file <- "E:/my_folder/my_subfolder/image1.png"
file_dir(file)
file_name(file)
file_extension(file)
# manipulate files
dir <- tempdir()
list.files(dir)
file.create(paste0(dir, "/test.txt"))
list.files(dir)
manipulate_files("test",
dir = paste0(dir, "\\"),
prefix = "chang_",
save_to = paste0(dir, "\\"),
overwrite = TRUE)
list.files(dir)
}
Run the code above in your browser using DataLab