Here\'s the situation. My R
code is supposed to check whether existing RData
files in application\'s cache are up-to-date. I do th
You can't "really" do it, but you could modify the code in my cgwtools::lsdata
function.
function (fnam = ".Rdata")
{
x <- load(fnam, envir = environment())
return(x)
}
This loads, thus taking time and briefly taking memory, and then the local environment disappears. So, add an argument for the items you want to check attributes for, add a line inside the function which does attributes(your_items) ->y ; return (list(x=x,y=y))
And there is a problem with the way you are using load()
. When you use save
/load
you can "freeze-dry" multiple objects to an .RData file. They "re-infalte" into the current environemnt. As a result, when you call load()
, it does not return the object(s), it returns a character vector with the names of all the objects that it restored. Since you didn't supply your save()
code, i'm not sure what's actually in your load file, but if it was a variable called data
, then just call
load(rdataFile)
not
data <- load(rdataFile)