[R] Assigning to multiple variables

2008-04-13 Thread Scott Romans
If we have a function that returns 2 or more values (such as dim as applied to a matrix), can we assign these 2 or more values to an equal number of differently named variables in one line? For example, is there any way to do something like this: [NumberRows NumberColumns] <- dim(MatrixA) T

[R] list()

2008-03-19 Thread Scott Romans
Is anyone familiar with a good tutorial (in print or online) on the use of list()? I found Matlab structures to be a great way to pass complex variables (such as a model consisting of differently- dimensioned variables) back and forth between functions. It seems list() requires that you defi

[R] Data Structures

2008-03-12 Thread Scott Romans
Matlab has an aggregate variable called a structure, which consists of component variables each of which can be of a different data type and dimension. For example, I can have a single structure Model which consists of Model.variable1, Model.variable2, and Model.variable3, where variable1 i