[R] How to detect whether a file exists or not?

Jeff Gentry jgentry at jimmy.harvard.edu
Thu Feb 12 06:18:28 CET 2004


> I would like my program to load variables x,y,x from a file 'myFile.r' but
> if this file does not exist, I want my program to create/initialize x,y,z.
> Does anyone know how to do this?

?file.exists




More information about the R-help mailing list