Re: [R] Are infix binary operators ** and ^ aliased?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed 12 Jul 2006 - 21:54:57 EST

It appears so. If we define ^ for class "x" then ** seems to change in the same way:

> "^.x" <- function(x,y) x+y
> y <- structure(3, class = "x")
> y ** 4

[1] 7
attr(,"class")
[1] "x"

On 7/12/06, Jean lobry <lobry@biomserv.univ-lyon1.fr> wrote:
> Dear R-help,
>
> After making a typo (reminiscent of FORTRAN 77, I guess) I found the
> following:
>
> > identical(all.equal(2^(-10:10), 2**(-10:10)), TRUE)
> [1] TRUE
>
> I have tried to find the documentation about the ** operator but I was
> unsuccesful this way:
>
> > sessionInfo()
> Version 2.3.1 (2006-06-01)
> powerpc-apple-darwin8.6.0
>
> attached base packages:
> [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets"
> [7] "base"
> > help("**")
> No documentation for '**' in specified packages and libraries:
> you could try 'help.search("**")'
> > help.search("\\*\\*")
> No help files found with alias or concept or title matching '\*\*'
> using regular expression matching.
> > RSiteSearch("**")
> A search query has been submitted to http://search.r-project.org
> The results page should open in your browser shortly
> # --> Too many hits
>
> Where can I find the documentation about the ** operator?
>
> Thanks for any hint,
>
> Jean Lobry
> --
> Jean R. Lobry (lobry@biomserv.univ-lyon1.fr)
> Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - LYON I,
> 43 Bd 11/11/1918, F-69622 VILLEURBANNE CEDEX, FRANCE
> allo : +33 472 43 12 87 fax : +33 472 43 13 88
> http://pbil.univ-lyon1.fr/members/lobry/
>
> ______________________________________________
> 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
>



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 Received on Wed Jul 12 22:08:57 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 13 Jul 2006 - 00:21:25 EST.

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