[Rd] Warnings generated by log2()/log10() are really large/t
Martin Maechler
maechler at stat.math.ethz.ch
Fri Feb 29 11:32:53 CET 2008
>>>>> "TH" == Ted Harding <Ted.Harding at manchester.ac.uk>
>>>>> on Wed, 27 Feb 2008 14:36:05 -0000 (GMT) writes:
TH> On 27-Feb-08 13:39:47, Gabor Grothendieck wrote:
>> On Wed, Feb 27, 2008 at 5:50 AM, Henrik Bengtsson
>> <hb at stat.berkeley.edu> wrote:
>>> On Wed, Feb 27, 2008 at 12:56 AM, Prof Brian Ripley
>>> <ripley at stats.ox.ac.uk> wrote:
>>> > On Wed, 27 Feb 2008, Martin Maechler wrote:
>>> >
>>> > > Thank you Henrik,
>>> > >
>>> > >>>>>> "HenrikB" == Henrik Bengtsson <hb at stat.berkeley.edu>
>>> > >>>>>> on Tue, 26 Feb 2008 22:03:24 -0800 writes:
>>> > >
>>> > > {with many superfluous empty statements ( i.e., trailing ";" ):
>>> >
>>> > Indeed!
>>>
>>> I like to add a personal touch to the code I'm writing ;)
>>>
>>> Seriously, I added them here as a bait in order to get a chance to say
>>> that I finally found a good reason for adding the semicolons. If you
>>> cut'n'paste code from certain web pages it may happen that
>>> newlines/carriage returns are not transferred and all code is pasted
>>> into the same line at the R prompt. With semicolons you still get a
>>> valid syntax. I cannot remember under what conditions this happened -
>>
>> I have seen that too and many others have as well since in some forums
>> (not related to R) its common to indent all source lines by two spaces.
>> Any line appearing without indentation must have been wrapped.
TH> A not-so-subtle solution to this (subtle or not) problem.
:-)
TH> NEVER paste from a browser (or a Word doc, or anything similar)
TH> into the R command interface. Paste only from pure plain text.
Yes. Thank you, Ted, for your good points which I'm just
re-iterating in the following:
TH> Therefore, if you must paste, then paste first into a window
TH> where a pure-plain-text editor is running.
Yes; or an R-aware editor (Tinn-R, Emacs(ESS), WinEDT, ....)
TH> Then you can see what you're getting, and can clean it up.
Yes; this gets you an ``R script file'' (ending that in '.R' is
a good choice) that you also can comment further etc etc
TH> After that, you can paste from this directly into R, or can
TH> save the file and source() it.
TH> Ted.
Yes, or (better :-) once you're using an R-aware editor, you can
send parts or all of the file to the running R also more quickly.
Using R code in *files* that you save, comment, re-evaluate, ...
IMO is still *the* way to do (almost) anything serious with R.
Using extraneous ";" at the end of lines, just to allow
something which is not at all recommendable
is not a good reason IMO.
Martin
More information about the R-devel
mailing list