Displaying 1 result from an estimated 1 matches for "infood".
2004 Dec 29
3
using get() in assign()
I'm trying to rename the columns in a list of data.frames using the
following...
for(i in 1:length(filenames)) {
assign(names(get(filenames[i])), c("name", "infood", "time") ) }
R returns no errors, but the names are unchanged in the data.frames.
The original names were things like
> names(get(filenames[2]))
[1] "Tc45w4.V1" "Tc45w4.V2" "Tc45w4.V3"
after the above procedure they are still those names.
Ideas...