Skip to content
Prev 383406 / 398502 Next

Problem with loop in folders

I suspect much if not all of your trouble would be eliminated by using
file.path() instead of paste0().

https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/file.path

(Also check your file name - you probably want a . between name and
csv, so using paste(name, "csv", sep = ".") would create a more usual
file name.

It's always a good idea to work thru your loop by hand once, and look
at all the intermediate steps. Often that quickly shows you where you
went wrong.

Sarah

On Fri, Apr 24, 2020 at 10:08 AM Shubhasmita Sahani
<shubhasmita.sahani at gmail.com> wrote: