How does one load an .RData
file that we know is a data frame such that one can use it as such? So I'm thinking along the lines of:
PATH <- getwd()
FILE_NAME <- "some_data_frame"
FILE_EXTENSION <- ".RData"
FILE_PATH <- paste0(PATH, "/", FILE_NAME, FILE_EXTENSION)
load(FILE_PATH)
So I did some more searching and I have an answer to my own question. This is what worked for me:
load(FILE_PATH)
df <- eval(parse(text = FILE_NAME))
It seems that the generic way to convert a string to an object is to use this eval-parse idiom.