> -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of kfcnhl > Sent: Thursday, August 20, 2009 7:34 PM > To: r-help@r-project.org > Subject: [R] extra . > > > sigma0 <- sqrt((6. * var(maxima))/pi) > > What does the '.' do here?
In R it does nothing: both '6' and '6.' parse as "numerics" (in C, double precision numbers). In SV4 and S+ '6' parses as an integer (in C, a long) and '6.' parses as a numeric, so putting the decimal point after numerics makes the code a bit more portable, although there are not too many cases where the difference is significant. Calls to .C, etc., and oveflowing arithmetic are the main problem points. In R and S+ '6L' represents an integer. S+'s parse has a parse.mode="R" argument that parses text more like R does: '6' is a numeric, '_' is not the assignment operator, && has higher precedence than ||, etc. > -- > View this message in context: > http://www.nabble.com/extra-.-tp25073255p25073255.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org 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. > ______________________________________________ R-help@r-project.org 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.