Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201945

R Can i store a location in something so i can reference it multiple times without having to retype it or if it changes?

$
0
0

I have five files that are all part of the same thing and intermingled in them are occasional exports of csv files. Currently, i have the full path written out for each of them, but i had to change a folder and then go through all of the files and find every reference and change them too.

Is there a way in R to store text, like "C:\R\Folder\New" so that then i can just reference an object or something and then i only have to change the path once?

In SAS i'd use a %let statement.

Maybe something like??

path <- "C:\R\Folder\New"

And then:

write.table(grouped_ageck, file="??PATH??\\qc\\ageck.csv", sep=",", row.names=F)


Viewing all articles
Browse latest Browse all 201945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>