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 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.

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) >>> pl

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.co

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 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 ne

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

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 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

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 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 can't find

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

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 wrote: > On 19/08/14 14:20, William Dunlap wrote: >> >> Have you tried the 'envir' argument

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$obje

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 wr

[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 d