Hi R people:
  
 On page 235 of the Blue Book (Becker, Chambers, and Wilks), there is a 
"compose2" function.
  
 compose2 <- function(f,g) {
 gg <- substitute(g1(x))
 print(gg)
 gg[[1]] <- g
 ff <- substitute(f1(y))
 print(ff)
 ff[[1]] <- f
 ff[[2]] <- gg
 print(ff)
 fun <- function(x){ NULL }
 fun[[2]] <- ff
 fun
}

 However, when I run this function using sum and log (as in the example), I get 
the following error:
  
 Error in fun[[2]] <- ff : object of type 'closure' is not subsettable
>
 Has anyone else run into this, please?
 Or is this a merely an issue with a dated concept, please?
  
 Thanks in advance,
 Sincerely,
 Erin Hodgess
  
 mailto: [EMAIL PROTECTED]
  
 
        [[alternative(swapped) HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to