How to read in OTHER file with read.csv in R, if first file is not found? -


i using r read in file, therefore use read.csv. files come dataset , tagged date. however, dates missing. date x, want read in file "x". because files missing, r gives me "error in file(file, "rt") : cannot open connection". instead, want r automatically read in file "x-1" if "x" nonexistent (or "x-2" if "x-1" nonexistent etcetera). thus, looking kind of "iferror" statement around this. not find kind of statement, know how detect "rt" , act on it? regards, margot


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -