-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/10/10 13:08, Ron Michael 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.

Just use

dir.create(showWarnings=FALSE)

This will create the directory if it does not exist, and do nothing if
it does. If showWarnings=TRUE, it will give you a warning that the
directory exists.

Cheers,

Rainer

>  
> 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.


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      rai...@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzKtV0ACgkQoYgNqgF2egpRSACgiB498c+M0ICsoJMZxS051lkw
k4UAn0XAI52H1LtRZAJSUQcB6haK8xWO
=66jA
-----END PGP SIGNATURE-----

______________________________________________
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.

Reply via email to