Thanks for helping me see why R doesn't have the "obvious"! -Bob

> -----Original Message-----
> From: Thomas Lumley [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 27, 2007 2:12 PM
> To: Muenchen, Robert A (Bob)
> Subject: RE: [R] subset using noncontiguous variables by name (not
> index)
> 
> On Mon, 27 Aug 2007, Muenchen, Robert A (Bob) wrote:
> 
> > Thomas, that's a good point. I was thinking of anscombe[x1::y1]
> making
> > it clear which one, but you would then want just x1::y1 to have
> > unambiguous meaning on its own, which is impossible.
> >
> > As for x1:xN, it's unambiguous on its own.
> 
> 
> It actually isn't. We already have a meaning. Consider
>    x1<-4
>    xN<-6
>    x1:xN
> It also breaks R's argument passing rules by treating x1 as string
> rather than a name.
> 
> What would be unambiguous at the moment is "x1":"x4", provided there
> was a sufficiently precise set of rules on what was allowed. Consider
>   "x1":"x-1"    (negative?)
>   "x1":"x3.14"  (non-integer?)
>   "x3.12":"x3.14" (is the prefix x or x3.?)
>   "x1":"X4"     (the prefix changes)
>   "01":"14"     (is the prefix empty or 0?)
>   "x09":"xA2"     (is this illegal decimal or legal hexadecimal?)
>   "IL23R1":"IL23R4" (what is the prefix?)
>   "x1a":"x4a"    (infix numbering?)
> 
> 
> 
>       -thomas
> 
> Thomas Lumley                 Assoc. Professor, Biostatistics
> [EMAIL PROTECTED]     University of Washington, Seattle
>

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to