[R] I don't understand this
Barry Rowlingson
B.Rowlingson at lancaster.ac.uk
Wed Sep 3 12:04:11 CEST 2003
Simon Fear wrote:
>>foo(x) <- 10
>
> Error: couldn't find function "foo<-"
this is because you defined 'foo', and not 'foo<-', which are two
different functions.
if instead (or as well) you did:
"foo<-" <- if (TRUE) get("names<-") else get("dim<-")
then it works.
Doesn't cure this one though:
> (foo)(x) <- 10
Error: couldn't find function "@<-"
Where's the gurus?
Baz
More information about the R-help
mailing list