[R] Defining a "list"

Rolf Turner r.turner at auckland.ac.nz
Thu Oct 16 00:06:19 CEST 2008


On 16/10/2008, at 10:47 AM, Wacek Kusnierczyk wrote:

> Rolf Turner wrote:
>>
>> On 16/10/2008, at 12:28 AM, Henrique Dallazuanna wrote:
>>
>>> Try this:
>>>
>>> lapply(1:n, rnorm)
>>
>> That has nothing to do with what the inquirer *asked*.
>>
> probably because it's not what the inquirer knew he *should* have  
> asked.
> it does solve the task he used as an example in a way far better then
> the imperative-style sequence of assignments (no intention to  
> criticize
> your intro to lists, just that it should not be taken as a generally
> superior solution).  and it can probably be used as a pattern for the
> real problem he wanted to solve.

The inquirer gave that example ***as an example***.  Clearly just a toy
example which may well have had nothing to do with what he really wanted
to accomplish.  His question was about the general task of creating a
list and sequentially assigning values to entries of the list, a task
the execution of which is often required, and which in general has  
nothing
at all to do with the use of lapply().

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list