On Sun, Aug 1, 2010 at 7:56 AM, Ron Michael <[email protected]> wrote: > Hi friends, I am aware of the function "-"() which acts as minus in ordinary > computations. For example: > >> "-"(3, 1) > [1] 2 > > However what is the meaning of >> "-"(3) > [1] -3
This seems quite functionally useful; consider the behavior of some of the other operators: > - 3 [1] -3 > --3 [1] 3 > +3 [1] 3 > /3 Error: unexpected '/' in "/" > *3 Error: unexpected '*' in "*" '-' and '+' taking one argument is rather convenient. > > I was expecting R to generate some error as it does for "*"(3). What is the > logic for that calculation? > > Thanks, > > > [[alternative HTML version deleted]] > > > ______________________________________________ > [email protected] 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. > > -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ ______________________________________________ [email protected] 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.

