Re: [Rd] S3 methods with full name in documentation?

2012-03-20 Thread Duncan Murdoch
On 12-03-20 4:40 PM, Spencer Graves wrote: Hello: Is there a recommended way to inform "R CMD check" that a function like "as.numeric" is NOT a method for the S3 generic function "as" for objects of class "numeric"? I ask, because I'm getting "NOTE" messages for many function

Re: [Rd] Substitute adds id attribute?

2012-03-20 Thread Hadley Wickham
> Well, yes; you can get there more quickly as follows: > >> x <- as.name("foo") >> attr(x,"id") <- 7913 >> x > foo > attr(,"id") > [1] 7913 >> substitute(foo) > foo > attr(,"id") > [1] 7913 > > I.e. if you ever put an attribute on a symbol, it stays there "forever". The > fix is probably to forbi

Re: [Rd] Substitute adds id attribute?

2012-03-20 Thread peter dalgaard
On Mar 20, 2012, at 22:31 , Hadley Wickham wrote: > Hi all, > > I can't figure out how to make this problem easily reproducible, but I > can demonstrate it very simply, so I hoped someone might be able to > suggest a place to start: > >> f <- function(x) substitute(x) >> f(x) > x >> f(mpg) > mp

[Rd] Substitute adds id attribute?

2012-03-20 Thread Hadley Wickham
Hi all, I can't figure out how to make this problem easily reproducible, but I can demonstrate it very simply, so I hoped someone might be able to suggest a place to start: > f <- function(x) substitute(x) > f(x) x > f(mpg) mpg attr(,"id") [1] 11 It works as expected in a clean R session: > f <

Re: [Rd] R's copying of arguments (Re: Julia)

2012-03-20 Thread oliver
On Tue, Mar 20, 2012 at 12:08:12PM -0700, Hervé Pagès wrote: [...] > >So the situation is somewhere between: "it is possible" and > >"R does not support a safe decision if, what is possible, also > >can be recommended". > >At the moment R rather deprecates in-place modification by default > >(the s

[Rd] S3 methods with full name in documentation?

2012-03-20 Thread Spencer Graves
Hello: Is there a recommended way to inform "R CMD check" that a function like "as.numeric" is NOT a method for the S3 generic function "as" for objects of class "numeric"? I ask, because I'm getting "NOTE" messages for many function names like this (e.g., "density.fd" in the "

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Dan Tenenbaum
On Tue, Mar 20, 2012 at 12:14 PM, Duncan Murdoch wrote: > This should now be fixed in R-devel, and shortly in the 2.15.0 beta. Thanks very much. Dan > > Duncan Murdoch > > > On 12-03-20 2:54 PM, Dan Tenenbaum wrote: >> >> On Tue, Mar 20, 2012 at 11:51 AM, Duncan Murdoch >>  wrote: >>> >>> On 12

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Duncan Murdoch
This should now be fixed in R-devel, and shortly in the 2.15.0 beta. Duncan Murdoch On 12-03-20 2:54 PM, Dan Tenenbaum wrote: On Tue, Mar 20, 2012 at 11:51 AM, Duncan Murdoch wrote: On 12-03-20 1:46 PM, Dan Tenenbaum wrote: On Tue, Mar 20, 2012 at 10:41 AM, Duncan Murdoch wrote: On 1

Re: [Rd] R's copying of arguments (Re: Julia)

2012-03-20 Thread Hervé Pagès
Hi Oliver, On 03/17/2012 08:35 AM, oliver wrote: Hello, regarding the copying issue, I would like to point to the "Writing R-Extensions" documentation. There it is mentio9ned, that functions of extensions that use the .C interface normally do get their arguments pre-copied... In section 5.2

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Dan Tenenbaum
On Tue, Mar 20, 2012 at 11:51 AM, Duncan Murdoch wrote: > On 12-03-20 1:46 PM, Dan Tenenbaum wrote: >> >> On Tue, Mar 20, 2012 at 10:41 AM, Duncan Murdoch >>  wrote: >>> >>> On 12-03-20 1:25 PM, Dan Tenenbaum wrote: On Tue, Mar 20, 2012 at 10:21 AM, Duncan Murdoch    wrote: >

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Duncan Murdoch
On 12-03-20 1:46 PM, Dan Tenenbaum wrote: On Tue, Mar 20, 2012 at 10:41 AM, Duncan Murdoch wrote: On 12-03-20 1:25 PM, Dan Tenenbaum wrote: On Tue, Mar 20, 2012 at 10:21 AM, Duncan Murdoch wrote: On 12-03-19 10:27 PM, Dan Tenenbaum wrote: Hello, Sorry to repeat myself, but I was wo

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Dan Tenenbaum
On Tue, Mar 20, 2012 at 10:41 AM, Duncan Murdoch wrote: > On 12-03-20 1:25 PM, Dan Tenenbaum wrote: >> >> On Tue, Mar 20, 2012 at 10:21 AM, Duncan Murdoch >>  wrote: >>> >>> On 12-03-19 10:27 PM, Dan Tenenbaum wrote: Hello, Sorry to repeat myself, but I was wondering if a

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Duncan Murdoch
On 12-03-20 1:25 PM, Dan Tenenbaum wrote: On Tue, Mar 20, 2012 at 10:21 AM, Duncan Murdoch wrote: On 12-03-19 10:27 PM, Dan Tenenbaum wrote: Hello, Sorry to repeat myself, but I was wondering if anyone had taken a look at this. No. Could you put together a simple self contained example?

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Dan Tenenbaum
On Tue, Mar 20, 2012 at 10:21 AM, Duncan Murdoch wrote: > On 12-03-19 10:27 PM, Dan Tenenbaum wrote: >> >> Hello, >> >> Sorry to repeat myself, but I was wondering if anyone had taken a look at >> this. > > > No.  Could you put together a simple self contained example?  I don't have > any BioC pac

Re: [Rd] issue with Rd2pdf and \Sexpr in Rd files

2012-03-20 Thread Duncan Murdoch
On 12-03-19 10:27 PM, Dan Tenenbaum wrote: Hello, Sorry to repeat myself, but I was wondering if anyone had taken a look at this. No. Could you put together a simple self contained example? I don't have any BioC packages installed. Alternatively, you could take a look at the .tex files ge

[Rd] overriding "summary.default" or "summary.data.frame". How?

2012-03-20 Thread Paul Johnson
I suppose everybody who makes a package for the first time thinks "I can change anything!" and then runs into this same question. Has anybody written out information on how a package can override functions in R base in the R 2.14 (mandatory NAMESPACE era)? Suppose I want to alphabetize variables i

Re: [Rd] enableJIT(3) with Primitives

2012-03-20 Thread luke-tierney
Bug -- will look into it. luke On Mon, 19 Mar 2012, R. Michael Weylandt wrote: I'm not sure if this is a bug or expected behavior, but I don't see anything in the documentation that explains it, so I thought I'd mention it: ~ michaelweylandt$ R -q --vanilla library(compiler) enableJIT(3) `+

[Rd] enableJIT(3) with Primitives

2012-03-20 Thread R. Michael Weylandt
I'm not sure if this is a bug or expected behavior, but I don't see anything in the documentation that explains it, so I thought I'd mention it: ~ michaelweylandt$ R -q --vanilla library(compiler) enableJIT(3) `+` # Throws an error `+` # Throws a warning `+` # Prints the primitive as expected s