Re: [Rd] Error Message while Package creation

2013-04-24 Thread Berend Hasselman
On 25-04-2013, at 07:21, Crish.. wrote: > Hello Guys, > > I wanted to build a new R package from the R code. I installed all the > required software and made all the path settings. > > When i tried running, > cmd> RCMD check SamplePackageName > > while "Checking R code for possible errors"

[Rd] Error Message while Package creation

2013-04-24 Thread Crish..
Hello Guys, I wanted to build a new R package from the R code. I installed all the required software and made all the path settings. When i tried running, cmd> RCMD check SamplePackageName while "Checking R code for possible errors" i have encountered a note saying: waning in png(file=Output

[Rd] Error Message while creation Package

2013-04-24 Thread Crish..
Hello Guys, I wanted to build a new R package from the R code. I installed all the required software and made all the path settings. When i tried running, cmd> RCMD check SamplePackageName while "Checking R code for possible errors" i have encountered a note saying: waning in png(file=Output

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-04-24 Thread Duncan Murdoch
On 13-04-24 8:08 PM, Hervé Pagès wrote: On 04/18/2013 11:41 AM, Yihui Xie wrote: I second the change of "} else {". Me too. Note that print.function() will screw it only if you use useSource=FALSE: > print.function(foo3, useSource=FALSE) function () { if (FALSE) {

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-04-24 Thread Hervé Pagès
On 04/18/2013 11:41 AM, Yihui Xie wrote: I second the change of "} else {". Me too. Note that print.function() will screw it only if you use useSource=FALSE: > print.function(foo3, useSource=FALSE) function () { if (FALSE) { letters } else { LETTERS } }

Re: [Rd] is.vector(as.vector(x, m), m) not always TRUE

2013-04-24 Thread Hervé Pagès
On 04/24/2013 09:02 AM, peter dalgaard wrote: This is now fixed in R-devel (never actually bit anyone, did it?) Thanks for fixing... before someone gets bitten :-) as.vector() just made it into the BiocGenerics package, and the man page for BiocGenerics::as.vector redirects the reader to the m

Re: [Rd] multiple issues with is.unsorted()

2013-04-24 Thread Hervé Pagès
On 04/24/2013 12:00 PM, Hervé Pagès wrote: Hi, On 04/24/2013 09:27 AM, William Dunlap wrote: >>> is.unsorted(NA) >> [1] NA >> => Contradicts "all objects of length 0 or 1 are sorted". Ok. I really think we should change the above. If NA is for a missing number, it still cannot b

Re: [Rd] multiple issues with is.unsorted()

2013-04-24 Thread Hervé Pagès
Hi, On 04/24/2013 09:27 AM, William Dunlap wrote: >>> is.unsorted(NA) >> [1] NA >> => Contradicts "all objects of length 0 or 1 are sorted". Ok. I really think we should change the above. If NA is for a missing number, it still cannot be unsorted if it is of length one. --> the ab

Re: [Rd] Verbose output from R CMD check

2013-04-24 Thread dpleydell
Many thanks for these comments Simon, that really helps me a lot! warm regards David On 23/04/13 19:30, Simon Urbanek wrote: On Apr 23, 2013, at 12:43 PM, dpleydell wrote: Many thanks Simon for your response Identifying the source of the message is a non-trivial problem because there are

Re: [Rd] multiple issues with is.unsorted()

2013-04-24 Thread William Dunlap
>>>> is.unsorted(NA) >>> [1] NA >>> => Contradicts "all objects of length 0 or 1 are sorted". > > Ok. I really think we should change the above. > If NA is for a missing number, it still cannot be unsorted if it > is of length one. > > --> the above will give FALSE "real soon now".

Re: [Rd] as.name and namespaces

2013-04-24 Thread William Dunlap
Hi Pat, You could use substitute(), > mycall <- quote(list(lm(Y ~ x1), lm(Y ~ x2))) > do.call("substitute", list(mycall, list(lm=quote(stats::lm list(stats::lm(Y ~ x1), stats::lm(Y ~ x2)) The do.call is necessary because substitute() does not evaluate its first argument and we want 'myc

Re: [Rd] is.vector(as.vector(x, m), m) not always TRUE

2013-04-24 Thread peter dalgaard
This is now fixed in R-devel (never actually bit anyone, did it?) -pd On Apr 24, 2013, at 08:11 , peter dalgaard wrote: >>> >>> is.vector(as.vector("a", "name"), "name") >> [1] FALSE >> >> Mmmh, the default method itself doesn't seem to follow its own >> conventions :-/ >> > > Looks like the

Re: [Rd] multiple issues with is.unsorted()

2013-04-24 Thread Hervé Pagès
Hi Martin, On 04/24/2013 02:29 AM, Martin Maechler wrote: Dear Herve, Hervé Pagès on Tue, 23 Apr 2013 23:09:21 -0700 writes: > Hi, In the man page for is.unsorted(): >Value: > A length-one logical value. All objects of length 0 > or 1 are sorted: the re

Re: [Rd] about the 'length' arg of vector()

2013-04-24 Thread Hervé Pagès
On 04/24/2013 12:53 AM, Martin Maechler wrote: Hervé Pagès on Tue, 23 Apr 2013 16:20:00 -0700 writes: > Hi, In the man page for vector(): >length: A non-negative integer specifying the desired > length. Double values will be coerced to integer: > supplying an arg

Re: [Rd] multiple issues with is.unsorted()

2013-04-24 Thread Martin Maechler
More comments .. see inline > Martin Maechler > on Wed, 24 Apr 2013 11:29:39 +0200 writes: > Dear Herve, > Hervé Pagès > on Tue, 23 Apr 2013 23:09:21 -0700 writes: >> Hi, In the man page for is.unsorted(): >> Value: >> A length-one logical value. All obje

Re: [Rd] Solved and Question: Problem with S3 method dispatch and NAMESPACE

2013-04-24 Thread Frank Harrell
Thank you very much Peter. That did the trick. Frank Peter Dalgaard-2 wrote > On Apr 24, 2013, at 15:59 , Frank Harrell wrote: > >> I found that package quantreg has created a new generic for latex() [I >> wish >> it hadn't; this has been a generic in Hmisc for almost 2 decades]. When >> I >> r

Re: [Rd] Solved and Question: Problem with S3 method dispatch and NAMESPACE

2013-04-24 Thread peter dalgaard
On Apr 24, 2013, at 15:59 , Frank Harrell wrote: > I found that package quantreg has created a new generic for latex() [I wish > it hadn't; this has been a generic in Hmisc for almost 2 decades]. When I > require(quantreg) after loading rms, latex(anova.rms object) dispatches > latex.default, bu

[Rd] Solved and Question: Problem with S3 method dispatch and NAMESPACE

2013-04-24 Thread Frank Harrell
I found that package quantreg has created a new generic for latex() [I wish it hadn't; this has been a generic in Hmisc for almost 2 decades]. When I require(quantreg) after loading rms, latex(anova.rms object) dispatches latex.default, but everything is fine if I don't load quantreg. rms has imp

Re: [Rd] as.name and namespaces

2013-04-24 Thread Hadley Wickham
On Wed, Apr 24, 2013 at 4:29 AM, Patrick Burns wrote: > Here is an example problem: > >> mycall <- expression(lm(Y ~ x))[[1]] >> mycall > lm(Y ~ x) >> newname <- "stats::lm" > >> desiredResult > stats::lm(Y ~ x) > > I've solved the problem in the kludgy way of > deparsing, fixing the string and th

Re: [Rd] as.name and namespaces

2013-04-24 Thread peter dalgaard
There's also the brute force option: > mycall <- expression(lm(Y ~ x))[[1]] > mycall[[1]] <- quote(stats::lm) > mycall stats::lm(Y ~ x) > eval(mycall, list(Y=rnorm(5),x=1:5)) Call: stats::lm(formula = Y ~ x) Coefficients: (Intercept)x 0.07430 0.02981 On Apr 24, 2013, a

Re: [Rd] as.name and namespaces

2013-04-24 Thread Patrick Burns
Here is an example problem: > mycall <- expression(lm(Y ~ x))[[1]] > mycall lm(Y ~ x) > newname <- "stats::lm" > desiredResult stats::lm(Y ~ x) I've solved the problem in the kludgy way of deparsing, fixing the string and then parsing. I like Duncan's third method, but it seems like it assumes

Re: [Rd] multiple issues with is.unsorted()

2013-04-24 Thread Martin Maechler
Dear Herve, > Hervé Pagès > on Tue, 23 Apr 2013 23:09:21 -0700 writes: > Hi, In the man page for is.unsorted(): >Value: > A length-one logical value. All objects of length 0 > or 1 are sorted: the result will be ‘NA’ for objects of > length 2 or more

Re: [Rd] about the 'length' arg of vector()

2013-04-24 Thread Martin Maechler
> Hervé Pagès > on Tue, 23 Apr 2013 16:20:00 -0700 writes: > Hi, In the man page for vector(): >length: A non-negative integer specifying the desired > length. Double values will be coerced to integer: > supplying an argument of length other than one is an >