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
Post a Comment