Try this variation of my.transform that I had posted here:
http://tolstoy.newcastle.edu.au/R/e2/help/07/09/24707.html
List - function(..., L = list()) {
f - function(){}
formals(f) - eval(substitute(as.pairlist(c(alist(...), L
body(f) - substitute(modifyList(L,
On Mon, Jun 21, 2010 at 4:28 PM, Thaler, Thorn, LAUSANNE, Applied
Mathematics thorn.tha...@rdls.nestle.com wrote:
Thanks, works as expected. But maybe I've to be a bit more clear about the
reason why I'd like to have such a construct.
In lattice you can define some parameters by passing a
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of Thaler, Thorn, LAUSANNE, Applied Mathematics
Sent: Monday, June 21, 2010 3:30 AM
To: r-help@r-project.org
Subject: [R] list() assigning the same
Hi everybody,
I'd like to have a list with two elements, where both elements have the same
value:
z - list(a=1, b=1)
If it happens, that I've to change the value, I've to assure that I change
both. This is error prone. Hence, a better way to achieve this is to define:
tmp - 1
z - list(a=tmp,
On 2010-06-21 3:30, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote:
Hi everybody,
I'd like to have a list with two elements, where both elements have the same
value:
z- list(a=1, b=1)
If it happens, that I've to change the value, I've to assure that I change
both. This is error prone.
2010 11:47
To: Thaler,Thorn,LAUSANNE,Applied Mathematics
Cc: r-help@r-project.org
Subject: Re: [R] list() assigning the same value to two items
On 2010-06-21 3:30, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote:
Hi everybody,
I'd like to have a list with two elements, where both elements have
On Mon, Jun 21, 2010 at 6:58 AM, Thaler, Thorn, LAUSANNE, Applied
Mathematics thorn.tha...@rdls.nestle.com wrote:
Thanks, works as expected. But maybe I've to be a bit more clear about the
reason why I'd like to have such a construct.
In lattice you can define some parameters by passing a
7 matches
Mail list logo