On Wed, 19 Jul 2006, Martin Maechler wrote:

[most discussion of unix tail behavior deleted]

>
> I know that there is some "good" reason for the behavior of
> 'tail' in "Unix"
>  { tail -3 === tail -n  3   and
>    tail -3 === tail -n -3      }
>
> but of course, we can't be compatible here, because in S
> (and most reasonable languages :-)
> "3 == +3"  and  "3 != -3" !
>


Ahhh. But in R

        quote( foo( +n ) ) != quote( foo( n ) )

so if one was determined to emulate GNU Coreutils tail's behavior it 
***could*** be done by using match.call to recover the explicit '+' or 
'-'.

But I shudder to think of the confusion that this approach might cause 
when n is an expression whose value is negative.


Chuck

Charles C. Berry                        (858) 534-2098
                                          Dept of Family/Preventive Medicine
E mailto:[EMAIL PROTECTED]               UC San Diego
http://biostat.ucsd.edu/~cberry/         La Jolla, San Diego 92093-0717

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to