[R] objects and environments

Adrian Dusa dusa.adrian at gmail.com
Wed Aug 9 17:36:37 CEST 2006


On Wednesday 09 August 2006 18:31, Dimitris Rizopoulos wrote:
> try this:
>
> fun1 <- function(x) {
>     environment(fun2) <- environment()
>     ifelse(somecondition, bb <- "o", bb <- "*")
>     ## mymatrix is created, then
>     myresult <- apply(mymatrix, 1, fun2)
> }

Beautiful :)
Thanks very much Dimitris, I was out of energy after several hours of 
struggling with this.
Best,
Adrian

-- 
Adrian Dusa
Romanian Social Data Archive
1, Schitu Magureanu Bd
050025 Bucharest sector 5
Romania
Tel./Fax: +40 21 3126618 \
          +40 21 3120210 / int.101



More information about the R-help mailing list