Amir Liu
2009-Dec-02 01:15 UTC
[R] Container/Collection Object to keep data structures and object
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: "number of items to replace is not a multiple of replacement length" What is the general purpose collection object in R to store more complex objects, or how are these things generally approached? Kind Regards, Amir _________________________________________________________________ Use Hotmail to send and receive mail from your different email accounts
Sharpie
2009-Dec-02 01:31 UTC
[R] Container/Collection Object to keep data structures and object
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 get an error like: > > "number of items to replace is not a multiple of replacement length" > > What is the general purpose collection object in R to store more complex > objects, or how are these things generally approached? > > > Kind Regards, > > Amir >Lists should be capable of holding any arbitrary R object. How are you trying to insert components such as a matrix? -- View this message in context: http://n4.nabble.com/Container-Collection-Object-to-keep-data-structures-and-object-tp932656p932666.html Sent from the R help mailing list archive at Nabble.com.