Displaying 1 result from an estimated 1 matches for "cyfun".
Did you mean:
myfun
2009 Sep 21
3
Create directory and copy files in R
HI, All R users,
My problem is:
> fn
[1] "C:/Documents and Settings/lma/Desktop/FamilyAEntrepreneurs/Entrepreneurs/Juha/book_log-20041210T095019.txt"
> dpath
[1] "C:/Documents and Settings/lma/My Documents/Juha/book"
I want to make a function "cyfun" to copy all files in "dir" to "deskdir" but I always got the following problem:
Error in file.exists(to) : invalid 'file' argument.
Whats the problem??
cyfun<-function(fn,dpath){
dir<-dirname(fn)
fn<-basename(fn)
deskdir<-dir.create(dpath)
file.co...