Displaying 1 result from an estimated 1 matches for "example_function".
2010 Jan 14
1
Error: object of type 'closure' is not subsettable
Hi everyone,
Would somebody please explain (or point me to a reference that explains)
the following error:
"Error: object of type 'closure' is not subsettable"
I was trying to use rep() to replicate a function:
> example_function <- function() { return(TRUE) }
> rep(example_function, 3)
Error: object of type 'closure' is not subsettable
But I just cannot understand this error. I can combine functions using
"c" without any problems:
> c(example_function, example_function)
[[1]]
function ()
{...