Re: [Rd] Bug in subsetting data frame (PR#13515)

From: William Dunlap <wdunlap_at_tibco.com>
Date: Tue, 10 Feb 2009 09:12:59 -0800

> -----Original Message-----
> From: r-devel-bounces_at_r-project.org
> [mailto:r-devel-bounces_at_r-project.org] On Behalf Of Duncan Murdoch
> Sent: Tuesday, February 10, 2009 7:12 AM
> To: Stavros Macrakis
> Cc: xinlee883_at_stat.math.ethz.ch; r-devel_at_stat.math.ethz.ch
> Subject: Re: [Rd] Bug in subsetting data frame (PR#13515)

[ lots deleted ]

> > Indeed! It is quite surprising that functions are defined
> using ordinary
> > assignment, but function lookup is different from normal variable
> > evaluation, e.g. that after c<-4, c(10) is different from
> (c)(10). Was this
> > inspired by some other language? I don't think it's done
> this way in any
> > other language I can think of....
> I think originally there was no difference, and it caused the obvious
> trouble when people used variable names like t and c other short
> function names, so this was added. I don't remember whether the
> different lookup rules showed up first in R or S.
>
> Duncan Murdoch

Splus 3.4 (July 1996, based on SV3 dated "Apr 30 09:54:11 EDT 1992") distinguished function vs. non-function lookups. E.g.,

  > f <- function(a,b,c) c(a,b,c)
  > f(11,12,13)
  [1] 11 12 13
  Warning messages:

     looking for function "c", ignored local non-function in: f(11, 12, 13)

I don't have easy access to any older version of S+. Somewhere along the line we dropped the warning.

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 10 Feb 2009 - 16:15:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Feb 2009 - 23:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive