[R] function question

Patrick Burns pburns at pburns.seanet.com
Thu Mar 19 18:38:08 CET 2009


Duncan Murdoch wrote:
> On 3/19/2009 12:49 PM, Edna Bell wrote:
>> Dear R Gurus:
>>
>> I read somewhere that functions are considered vectors.
>>
>> Is this true, please?
>
> Your question is a little ambiguous (you probably did read that, and 
> probably someone does consider them to be vectors), but I think the 
> right answer is no:  when the R documentation talks about vectors, it 
> is not talking about functions, and the is.vector() function returns 
> FALSE for functions.
>
> Duncan Murdoch

It could be that you read that about S+ functions,
where they can be thought of as (very special)
vectors.  R functions are different in this respect.

Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")

>
> ______________________________________________
> R-help at r-project.org 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.
>
>




More information about the R-help mailing list