[R] How to check if file is on a drive?
Hello, everyone How would I check in R if a particular file (Excel file) is in a particular folder on a particular drive? I am writing a piece of code around that file, using xls.open() in xlsReadWritePro to open the file in memory and use it. But before I try to open the file I want to catch the possibility of the file not being on the drive. Thank you in advance! SG __ 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.
Re: [R] How to check if file is on a drive?
?file.exists On 12/03/2009 11:31 AM, Sergey Goriatchev wrote: Hello, everyone How would I check in R if a particular file (Excel file) is in a particular folder on a particular drive? I am writing a piece of code around that file, using xls.open() in xlsReadWritePro to open the file in memory and use it. But before I try to open the file I want to catch the possibility of the file not being on the drive. Thank you in advance! SG -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/Gq7i : ohloh |- http://tr.im/FtUu : new package : highlight `- http://tr.im/EAD5 : LondonR slides __ 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.
Re: [R] How to check if file is on a drive?
Great! Thank you, Romain! On Thu, Dec 3, 2009 at 11:33, Romain Francois romain.franc...@dbmail.com wrote: ?file.exists On 12/03/2009 11:31 AM, Sergey Goriatchev wrote: Hello, everyone How would I check in R if a particular file (Excel file) is in a particular folder on a particular drive? I am writing a piece of code around that file, using xls.open() in xlsReadWritePro to open the file in memory and use it. But before I try to open the file I want to catch the possibility of the file not being on the drive. Thank you in advance! SG -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://tr.im/Gq7i : ohloh |- http://tr.im/FtUu : new package : highlight `- http://tr.im/EAD5 : LondonR slides -- I'm not young enough to know everything. /Oscar Wilde Experience is one thing you can't get for nothing. /Oscar Wilde When you are finished changing, you're finished. /Benjamin Franklin Tell me and I forget, teach me and I remember, involve me and I learn. /Benjamin Franklin Luck is where preparation meets opportunity. /George Patten Kniven skärpes bara mot stenen. __ 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.