Assigning a new name to object loaded with "load()"
Hi,
A bit late with my answer, but another possibility is to use to
saveObject() / loadObject() functions from R.utils. I find it much
easier to use than save() / load()
Example:
library(R.utils)
x <- 1:5
saveObject(x, file="test.Rbin")
y <- loadObject("test.Rbin")
identical(x,y)
HTH,
Ivan
--
Ivan CALANDRA
Universit? de Bourgogne
UMR CNRS/uB 6282 Biog?osciences
6 Boulevard Gabriel
21000 Dijon, FRANCE
+33(0)3.80.39.63.06
ivan.calandra at u-bourgogne.fr
http://biogeosciences.u-bourgogne.fr/calandra
Le 28/07/12 06:11, Alireza Mahani a ?crit :
This works, thank you! I imagine that for large objects there will be a penalty for calling this function since the objects will be loaded and then copied as the function's return value. -- View this message in context: http://r.789695.n4.nabble.com/Assigning-a-new-name-to-object-loaded-with-load-tp4638144p4638182.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.