ez.cp | R Documentation |
copy
ez.cp(from, to, overwrite = TRUE)
support c('a.txt','b.txt')
to folder does not have to exist already
e.g.,
1) both works ez.cp('a.txt','folder'), ez.cp('a.txt','folder/b.txt')
the former copy still has the same name 'a.txt', the latter copy new name 'b.txt'
also ez.cp(c('a.txt','b.txt'),'folder')
2) folder: ez.cp('a','b')-->if b not exists, cp contents of a to b; if b exist, a becomes subfolder of b
kinda combines rn and mv
3) regular expression
flist <- list.files("patha", "^filea.+[.]csv$", full.names = TRUE)
file.copy(flist, "pathb")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.