Eduardo, Try this: object.list <- sapply(objects(), function(x) get(x), simplify=F, USE.NAMES=T)
Dave From: Eduardo de Oliveira Horta <eduardo.oliveiraho...@gmail.com> To: r-help <r-help@r-project.org> Date: 01/03/2011 11:32 AM Subject: [R] Saving objects inside a list Sent by: r-help-boun...@r-project.org Hello there, any ideas on how to save all the objects on my workspace inside a list object? For example, say my workspace is as follows ls() [1] "x" "y" "z" and suppose I want to put these objects inside a list object, say object.list <- list() without having to explicitly write down their names as in object.list$x = x object.list$y = y object.list$z = z Is this possible? Thanks in advance, Eduardo Horta [[alternative HTML version deleted]] ______________________________________________ R-help@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. [[alternative HTML version deleted]] ______________________________________________ R-help@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.