[Rd] [PATCH] suggestions for R-lang manual
skostysh at princeton.edu
Tue Mar 4 22:45:22 CET 2014
On Mon, Mar 3, 2014 at 7:48 AM, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>>>>>> Scott Kostyshak <skostysh at princeton.edu>
>>>>>> on Thu, 27 Feb 2014 16:43:02 -0500 writes:
> > On Thu, Nov 21, 2013 at 1:17 AM, Scott Kostyshak <skostysh at princeton.edu> wrote:
> >> Attached is a patch with suggestions for the R-lang manual at r64277.
> >> Below are a few comments (some are implemented in the patch):
> >> In the section "Objects", there is a table introduced by "The
> >> following table describes the possible values returned by typeof". One
> >> of the results is "any". Can "any" be returned by "typeof()" ?
> ANYSXP is a valid internal type on the C level, and
> src/main/util.c will make typeof(ob) return "any"
> if you can get your hands at an R level object of that type.
> I'd guess you can only get it currently by using .Call() and
> using your own C code, .. but at least that way it must be possible.
Interesting to know.
> >> Regarding the "Recycling rules" section,
> >> -One exception is that when adding vectors to matrices, a warning is not
> >> -given if the lengths are incompatible.
> >> - at c Is that a bug?
> >> -
> >> was this a bug that was fixed?
> I did not investigate in details, but yes, I vaguely remember we
> had fixed that. So indeed, it's fine you omitted the para in
> your patch.
> >> I see the following behavior:
> >>> myvec <- 1:3
> >>> mymat <- matrix(1:12, ncol=2)
> >>> myvec <- 1:5
> >>> myvec + mymat
> >> [,1] [,2]
> >> [1,] 2 9
> >> [2,] 4 11
> >> [3,] 6 13
> >> [4,] 8 15
> >> [5,] 10 12
> >> [6,] 7 14
> >> Warning message:
> >> In myvec + mymat :
> >> longer object length is not a multiple of shorter object length
> >> Regarding
> >> -The arguments in the call to the generic are rematched with the
> >> -arguments for the method using the standard argument matching mechanism.
> >> -The first argument, i.e.@: the object, will have been evaluated.
> >> -
> >> this information is duplicated. See a few paragraphs up "When the
> >> method is invoked it is called..."
> >> Scott
> Thank you, Scott.
> Indeed, I've finally carefully looked at the patch, and applied
> it - for R-devel, to become R 3.1.0 in April.
Economics PhD Candidate
> >> --
> >> Scott Kostyshak
> >> Economics PhD Candidate
> >> Princeton University
> > The patch still applies cleanly (one offset) on r65090.
> > Best,
> > Scott
More information about the R-devel