Re: [R] loading saved files with objects in same names

2014-08-23 Thread Hadley Wickham
In the future, you can avoid this problem by using saveRDS and readRDS. Hadley On Mon, Aug 18, 2014 at 7:30 PM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Martin Maechler
Have you tried the 'envir' argument to load()? E.g., envA - new.environment() load(A.RData, envir=envA) envB - new.environment() load(B.RData, envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com An alternative that I have been advocating is

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Martin Maechler
On 20/08/2014, 8:58 AM, Barry Rowlingson wrote: On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Jinsong Zhao
On 2014/8/22 1:02, Martin Maechler wrote: Have you tried the 'envir' argument to load()? E.g., envA - new.environment() load(A.RData, envir=envA) envB - new.environment() load(B.RData, envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Duncan Murdoch
On 22/08/2014, 1:14 PM, Jinsong Zhao wrote: On 2014/8/22 1:02, Martin Maechler wrote: Have you tried the 'envir' argument to load()? E.g., envA - new.environment() load(A.RData, envir=envA) envB - new.environment() load(B.RData, envir=envB) plot(A$object, B$object)

Re: [R] loading saved files with objects in same names

2014-08-20 Thread Barry Rowlingson
On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to compare those objects through plotting. However, I

Re: [R] loading saved files with objects in same names

2014-08-20 Thread Duncan Murdoch
On 20/08/2014, 8:58 AM, Barry Rowlingson wrote: On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to

[R] loading saved files with objects in same names

2014-08-18 Thread Jinsong Zhao
Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to compare those objects through plotting. However, I can't find a way to load them into a workspace. The only thing I can

Re: [R] loading saved files with objects in same names

2014-08-18 Thread William Dunlap
Have you tried the 'envir' argument to load()? E.g., envA - new.environment() load(A.RData, envir=envA) envB - new.environment() load(B.RData, envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 5:30 PM, Jinsong Zhao

Re: [R] loading saved files with objects in same names

2014-08-18 Thread Rolf Turner
On 19/08/14 14:20, William Dunlap wrote: Have you tried the 'envir' argument to load()? E.g., envA - new.environment() load(A.RData, envir=envA) envB - new.environment() load(B.RData, envir=envB) plot(A$object, B$object) Did you mean plot(envA$object, envB$object)

Re: [R] loading saved files with objects in same names

2014-08-18 Thread William Dunlap
Rolf, Yes, I meant to write envA$object, etc, but did not read it twice before running off to dinner. Thanks. Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Aug 18, 2014 at 7:52 PM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 19/08/14 14:20, William Dunlap wrote: Have you tried

Re: [R] loading saved files with objects in same names

2014-08-18 Thread Jinsong Zhao
On 2014/8/18 19:20, William Dunlap wrote: Have you tried the 'envir' argument to load()? E.g., envA - new.environment() load(A.RData, envir=envA) envB - new.environment() load(B.RData, envir=envB) plot(A$object, B$object) Bill Dunlap TIBCO Software wdunlap tibco.com