Try this: if(!file.info('myfolder')$isdir) dir.create('myfolder')
On Fri, Oct 29, 2010 at 9:08 AM, Ron Michael <ron_michae...@yahoo.com>wrote: > Hi all, I am wondering is there any way to check whether some Directory > exists or not, given the parent path of that directory? After searching for > a while I found that there is a function dir.create() to create some > directory. However I need to know whether such directory already exists or > not, otherwise I will create that. > > Thanks, > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.