Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Wacek Kusnierczyk
Berwin A Turlach wrote: > G'day Stavros, > > On Fri, 13 Feb 2009 11:11:28 -0500 > Stavros Macrakis wrote: > > >> On Fri, Feb 13, 2009 at 10:47 AM, Gabor Grothendieck >> wrote: >> >>> See ?get and try: >>> >> Interesting. I hadn't paid attention to the 'mode' argument before. >> >>

Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > On Fri, Feb 13, 2009 at 12:25 PM, Berwin A Turlach > wrote: > >> On Fri, 13 Feb 2009 11:11:28 -0500 >> Stavros Macrakis wrote: >> >>> Where would it be advisable to use anything but mode='any' or >>> mode='function'? >>> >> I guess the answer to this quest

Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Stavros Macrakis
On Fri, Feb 13, 2009 at 12:25 PM, Berwin A Turlach wrote: > On Fri, 13 Feb 2009 11:11:28 -0500 > Stavros Macrakis wrote: >> Where would it be advisable to use anything but mode='any' or >> mode='function'? > > I guess the answer to this question is more often than not in the source. :) ... > The

Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Berwin A Turlach
G'day Stavros, On Fri, 13 Feb 2009 11:11:28 -0500 Stavros Macrakis wrote: > On Fri, Feb 13, 2009 at 10:47 AM, Gabor Grothendieck > wrote: > > See ?get and try: > > Interesting. I hadn't paid attention to the 'mode' argument before. > > Where would it be advisable to use anything but mode='an

Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Wacek Kusnierczyk
Stavros Macrakis wrote: > On Fri, Feb 13, 2009 at 10:47 AM, Gabor Grothendieck > wrote: > >> See ?get and try: >> > > Interesting. I hadn't paid attention to the 'mode' argument before. > > Where would it be advisable to use anything but mode='any' or mode='function'? > > don't know i

Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Stavros Macrakis
On Fri, Feb 13, 2009 at 10:47 AM, Gabor Grothendieck wrote: > See ?get and try: Interesting. I hadn't paid attention to the 'mode' argument before. Where would it be advisable to use anything but mode='any' or mode='function'? -s __ R-help@r

Re: [R] Distinguishing variables from functions with the same name

2009-02-13 Thread Gabor Grothendieck
See ?get and try: sin <- 1 get("sin", mode = "numeric") get("sin", mode = "function") On Fri, Feb 13, 2009 at 10:20 AM, 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

[R] Distinguishing variables from functions with the same name

2009-02-13 Thread JLucke
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"? Josep