r - file.remove gives "cannot remove file ... reason 'No such file or directory'" although I use "showWarnings = FALSE" -


in (non interactive) r script, running cmd.exe (on windows), have following line

file.remove('text.xls', showwarnings = false) 

when interpreter reaches line , file not exist, writes

cannot remove file 'text.xls', reason 'no such file or directory' 

although have set parameter showwarnings false. there way suppress message?

you can add if statement:

if(file.exists("text.xls"))     file.remove('text.xls', showwarnings = false) 

so file.remove function evaluated if indicated file exists


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -