copyFiles | R Documentation |
Copy files with specified prefixes and suffixes from one location to another.
copyFiles(prefix, suffix=NULL, srcdir=getwd(), dstdir=getwd(), ask=TRUE)
prefix |
string scalar/vector of potential file prefixes. |
suffix |
string scalar/vector of potential file suffixes. |
srcdir |
source directory from which to copy files. |
dstdir |
destination directory to copy files to. |
ask |
logical: if |
This function uses R's list.files
and file.copy
functions.
The pattern recognition tends not to work when given the wildcard character
*
; however, the user may use this character, and the code will interpret it.
Invisibly returns a Boolean vector with names of files that have been copied or not.
Rowan Haigh, Program Head – Offshore Rockfish
Pacific Biological Station (PBS), Fisheries & Oceans Canada (DFO), Nanaimo BC
locus opus: Offsite, Vancouver BC
Last modified Rd: 2011-02-14
editAD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.