[R] Spreadsheet math problem (exponentiation)

Duncan Murdoch murdoch.duncan at gmail.com
Fri Sep 18 20:13:20 CEST 2015

Hash: SHA512

On 18/09/2015 11:13 AM, Erich Neuwirth wrote:
> Let me add a little bit here:
> When using math formulas, one should know about the parsing rules
> form complex expression which do not have all the necessary
> parenthesis.
> Different systems do have different parings rules. In the case of
> a^b^c, the expression is ambiguus because (as mentioned in a
> previous mail) in general (a^b)^c != a^(b^c) To avoid unintended
> consequences, just us parentheses and you will get the right
> result. in the case of -a^b The question is the order of precedence
> of unary - and binary ^.
> In Excel, -2^2=4, but 0-2^2=-4
> Reason: For Excel, unary - is stronger than the power operator, but
> binary minus is weaker.
> My feeling is that too many people are bashing spreadsheets for the
> wrong reason. Spreadsheets ca do things R cannot do: Automatic
> recalculation when input changes,

Shiny is implemented in R and it has this.

> and visual point and click modelling of dependencies.

I'm not exactly sure what you mean here, but I think you're probably
right on this one, in that it is a user-interface issue.  People can
implement front-ends to R that do just about anything, but those
aren't part of R.

Duncan Murdoch

> The calculation engine of Excel admittedly has some weak points.
> That is the reason why I wrote RExcel which gives you all the
> advantages of the spreadsheet interface and allows you to use the R
> calculation within this interface whenever needed.
> ______________________________________________ R-help at r-project.org
> mailing list -- To UNSUBSCRIBE and more, see 
> 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.

Version: GnuPG/MacGPG2 v2
Comment: GPGTools - https://gpgtools.org


More information about the R-help mailing list