Message-ID: <971536df0902130747g4ba9dc4fx21c413f3a0b76b56@mail.gmail.com>
Date: 2009-02-13T15:47:02Z
From: Gabor Grothendieck
Subject: Distinguishing variables from functions with the same name
In-Reply-To: <OF2ECFDB65.15652660-ON8525755C.0053C208-8525755C.0054502C@ria.buffalo.edu>
See ?get and try:
sin <- 1
get("sin", mode = "numeric")
get("sin", mode = "function")
On Fri, Feb 13, 2009 at 10:20 AM, <JLucke at ria.buffalo.edu> wrote:
> guRus:
>
> I have a variable "beta" as an argument to R's beta function. So
> essentially I have a case of beta(alpha, beta). What surprises me is that
> R doesn't barf on this stupid programming practice. R gets the right
> answer. How does R know "beta the variable" from "beta the function"?
>
> Joseph F. Lucke
> Senior Statistician
> Research Institute on Addictions
> University at Buffalo
> SUNY
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>