Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-21 Thread Tim Howard
12 11:34:06 +0100 From: Jessica Streicher To: David Winsemius Cc: R help Subject: Re: [R] Filling Lists or Arrays of variable dimensions Message-ID: Content-Type: text/plain; charset=us-ascii @David : In my mind it was quite complete enough. @William: Thanks, didn't know you could do th

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-21 Thread Jessica Streicher
ot;slim", "wide") >>> >>> l <- list() >>> for(h in height){ >>>l[[h]] <- list() >>>for(w in width){ >>>l[[h]][[w]] <- paste(h, w, sep="/") # doSomething() >>>} >>

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread David Winsemius
uot;wdfac")], >>>> doSomething) >>>> >>>> # out is a data frame; this is a named list. >>>> # use as.list to remove the data.frame class >>>> >>>>> as.list(out) >>>> >>>> $htfac >>>>

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread William Dunlap
mation. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: Jessica Streicher [mailto:j.streic...@micromata.de] > Sent: Thursday, December 20, 2012 10:01 AM > To: William Dunlap > Cc: Chris Campbell; R help > Subject: Re: [R] Filling Li

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread William Dunlap
ic...@micromata.de] > Sent: Thursday, December 20, 2012 10:01 AM > To: William Dunlap > Cc: Chris Campbell; R help > Subject: Re: [R] Filling Lists or Arrays of variable dimensions > > Really must have been unclear at some point, sorry. > > William, thats interesting, b

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Chris Campbell
ile. +44 (0) 7929 628349 mailto:ccampb...@mango-solutions.comĀ | http://www.mango-solutions.com Mango Solutions 2 Methuen Park Chippenham Wiltshire SN14 OGB UK -Original Message- From: Jessica Streicher [mailto:j.streic...@micromata.de] Sent: 20 December 2012 18:01 To: William Dunlap Cc: Chris Cam

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Jessica Streicher
(50,100] >>> Levels: (0,50] (50,100] >>> >>> $par1 >>> [1] -1.0449563 -0.3782483 -0.9319105 0.8837459 >>> >>> >> >>> >>> I believe you are seeing an error similar to this one: >>> >>>> out[[1:3]

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread William Dunlap
uot;1" you get with stringsAsFactors=TRUE l[[ as.character(grid[1, ]) ]] # [1] "high/slim" l[[ as.character(grid[1, ]) ]] <- 1 l[[ as.character(grid[1, ]) ]] # [1] 1 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-b

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Jessica Streicher
705 450 | Mobile. +44 (0) 7929 628 349 > mailto:ccampb...@mango-solutions.com | http://www.mango-solutions.com > Mango Solutions > 2 Methuen Park > Chippenham > Wiltshire > SN14 OGB > UK > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-b

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Chris Campbell
g] On Behalf Of Jessica Streicher Sent: 20 December 2012 12:46 To: R help Subject: [R] Filling Lists or Arrays of variable dimensions Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") w

[R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Jessica Streicher
Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){