Re: [R] Vector of functions

2011-07-02 Thread Dennis Murphy
Hi, To amplify on Josh's cogent remarks, the reason you can't create a vector of functions is because vectors are composed of atomic objects and functions are not atomic objects: > is.atomic(f.3) [1] FALSE > is.atomic(1) [1] TRUE > is.atomic(TRUE) [1] TRUE > is.atomic('a') [1] TRUE 'Vectors' of

Re: [R] Vector of functions

2011-07-02 Thread Joshua Wiley
Hi Thomas, On Sat, Jul 2, 2011 at 9:36 AM, Thomas Stibor wrote: > Hi there, > > I have a vector of some functions e.g. > #-# > f.1 <- function(a) { >  return( a ); > } > f.2 <- function(a) { >  return( 1 - (tanh(a))^2 ); > } > f.3 <- function(a) { >  return( 1 / (1+exp