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

android - Pass an Serializable object in AIDL -

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

How to use Authorization & Authentication in Asp.net, C#? -