I am trying to load data frames that are saved in a certain folder. I have a bash script that loops along all *.gzip files in the folder and passes the file names as arguments to an R script (blah.r $file_name). Now, in the R script, the file name is saved as
file_name = commandArgs(TRUE)[1]
and it prints the correct file name. However, when I try to load the file
data(file_name)
R thinks that file_name is a string, not a variable, so it says that it can't find "file_name".
How can I get R to recognize this variable as a variable and not a literal string?
get(*)isn't applicable here.data()function. That is for loading example data from installed packages.