Re: [R] Container/Collection Object to keep data structures and object

2009-12-01 Thread Rolf Turner
On 2/12/2009, at 3:08 PM, Sharpie wrote: Amir Liu wrote: In l[3] <- matrix(1:4, 2, 2) : number of items to replace is not a multiple of replacement length When inserting single entries into a list list, you should use the '[[ ]]' notation. Use '[ ]' when you want to extract multipl

Re: [R] Container/Collection Object to keep data structures and object

2009-12-01 Thread Sharpie
Amir Liu wrote: > > In l[3] <- matrix(1:4, 2, 2) : >   number of items to replace is not a multiple of replacement length > When inserting single entries into a list list, you should use the '[[ ]]' notation. Use '[ ]' when you want to extract multiple entries or copy multiple entries from on

Re: [R] Container/Collection Object to keep data structures and object

2009-12-01 Thread Amir Liu
matrix(1:4, 2, 2) :   number of items to replace is not a multiple of replacement length > Date: Tue, 1 Dec 2009 17:31:41 -0800 > From: ch...@sharpsteen.net > To: r-help@r-project.org > Subject: Re: [R] Container/Collection Object to keep d

Re: [R] Container/Collection Object to keep data structures and object

2009-12-01 Thread Sharpie
Amir Liu wrote: > > I want to have a collection object that can store objects. In R I only saw > lists. But these only seem to be able to handle basic objects like numbers > and strings. Whenever I tried to add more complicated objects or just very > simple data structures like matrices I would

[R] Container/Collection Object to keep data structures and object

2009-12-01 Thread Amir Liu
I want to have a collection object that can store objects. In R I only saw lists. But these only seem to be able to handle basic objects like numbers and strings. Whenever I tried to add more complicated objects or just very simple data structures like matrices I would get an error like: "n