Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Duncan Murdoch
Romain Francois wrote: Duncan Murdoch wrote: Simon Urbanek wrote: On Jun 18, 2009, at 17:02 , Duncan Murdoch wrote: Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generate

Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Romain Francois
Duncan Murdoch wrote: Simon Urbanek wrote: On Jun 18, 2009, at 17:02 , Duncan Murdoch wrote: Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a way to

Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Duncan Murdoch
Simon Urbanek wrote: On Jun 18, 2009, at 17:02 , Duncan Murdoch wrote: Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a way to grab the error. It lo

[Rd] validObject throws non-caught error when slot doesn't exist

2009-06-18 Thread Patrick Aboyoun
I have been retooling an S4 class definition to include another slot and have found that the methods::validObject function (defined in methods/R/SClasses.R) in R-devel throws an error that isn't caught internally (and thus not controllable by 'test' argument) when retrieving a non-existent slot

Re: [Rd] ScalarLong?

2009-06-18 Thread Simon Urbanek
On Jun 18, 2009, at 16:34 , Kynn Jones wrote: I was surprised to see that there is a ScalarInteger function in Rinlinedfuns.h, but nothing like ScalarLong. How can one create an R-integer from a C long? There is no such thing as "long" in R (*), so one cannot make a "scalar long" vector i

Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Simon Urbanek
On Jun 18, 2009, at 17:02 , Duncan Murdoch wrote: Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a way to grab the error. It looks like yyerror populates th

Re: [Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Duncan Murdoch
Romain Francois wrote: Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a way to grab the error. It looks like yyerror populates the buffer "R_ParseErrorMsg", but then the variable is

[Rd] ScalarLong?

2009-06-18 Thread Kynn Jones
I was surprised to see that there is a ScalarInteger function in Rinlinedfuns.h, but nothing like ScalarLong. How can one create an R-integer from a C long? TIA! kynn [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list

[Rd] R_parseVector and syntax error [was: error messages while parsing with rniParse]

2009-06-18 Thread Romain Francois
Hello, [I'm redirecting this here from stats-rosuda-devel] When parsing R code through R_parseVector and the code generates an error (syntax error), is there a way to grab the error. It looks like yyerror populates the buffer "R_ParseErrorMsg", but then the variable is not part of the public a

Re: [Rd] binding message from R CMD check

2009-06-18 Thread Prof Brian Ripley
On Thu, 18 Jun 2009, Terry Therneau wrote: When I run R CMD check on the survival package I get one error message that I have not been able to figure out: survfitCI: no visible binding for global variable 'n.nevent' I've examined the code and can't see the problem -- the variable in questio

Re: [Rd] Argument as.integer(NA) to a function C

2009-06-18 Thread Prof Brian Ripley
On Thu, 18 Jun 2009, Christophe Genolini wrote: Hi the list, I am writing a R function that call a C function. The C function needs integers but I do not manage to give a NA integer as argument : --- C code --- void essai(int *t){ Rprintf("\nT0=%i T1=%i T2=%i T3=%i",t[0],t[1],t[2],t[3]); }

[Rd] binding message from R CMD check

2009-06-18 Thread Terry Therneau
When I run R CMD check on the survival package I get one error message that I have not been able to figure out: survfitCI: no visible binding for global variable 'n.nevent' I've examined the code and can't see the problem -- the variable in question appears several times. Is there as way t

Re: [Rd] Argument as.integer(NA) to a function C

2009-06-18 Thread Simon Urbanek
On Jun 18, 2009, at 9:57 , Christophe Genolini wrote: Hi the list, I am writing a R function that call a C function. The C function needs integers but I do not manage to give a NA integer as argument : --- C code --- void essai(int *t){ Rprintf("\nT0=%i T1=%i T2=%i T3=%i",t[0],t[1],t[2],t

[Rd] Argument as.integer(NA) to a function C

2009-06-18 Thread Christophe Genolini
Hi the list, I am writing a R function that call a C function. The C function needs integers but I do not manage to give a NA integer as argument : --- C code --- void essai(int *t){ Rprintf("\nT0=%i T1=%i T2=%i T3=%i",t[0],t[1],t[2],t[3]); } --- R --- boub <- c(1,2,3,4) .C("pour",as.intege

Re: [Rd] Inverting a square... (PR#13762)

2009-06-18 Thread P . Dalgaard
Refiling this. The actual fix was slightly more complicated. Will soon be committed to R-Patched (aka 2.9.1 beta). -p rvarad...@jhmi.edu wrote: > Full_Name: Ravi Varadhan > Version: 2.8.1 > OS: Windows > Submission from: (NULL) (162.129.251.19) >=20 >=20 > Inverting a matrix with solve()

Re: [Rd] Inverting a square... (PR#13765)

2009-06-18 Thread P . Dalgaard
Drats!. Jitterbug is up to its old PR renaming trick again... This should have been a followup to PR#13762. Will refile. p.dalga...@biostat.ku.dk wrote: > rvarad...@jhmi.edu wrote: >> Full_Name: Ravi Varadhan >> Version: 2.8.1 >> OS: Windows >> Submission from: (NULL) (162.129.251.19) >> >> >> Inv

Re: [Rd] Inverting a square matrix using solve() with LAPACK=TRUE (PR#13765)

2009-06-18 Thread p . dalgaard
rvarad...@jhmi.edu wrote: > Full_Name: Ravi Varadhan > Version: 2.8.1 > OS: Windows > Submission from: (NULL) (162.129.251.19) > > > Inverting a matrix with solve(), but using LAPACK=TRUE, gives erroneous > results: Thanks, but there seems to be a much easier fix. Inside coef.qr, we have coef[

Re: [Rd] Inverting a square matrix using solve() with LAPACK=TRUE (PR#13762)

2009-06-18 Thread Peter Dalgaard
rvarad...@jhmi.edu wrote: Full_Name: Ravi Varadhan Version: 2.8.1 OS: Windows Submission from: (NULL) (162.129.251.19) Inverting a matrix with solve(), but using LAPACK=TRUE, gives erroneous results: Thanks, but there seems to be a much easier fix. Inside coef.qr, we have coef[qr$pivot, ] <

[Rd] Inverting a square matrix using solve() with LAPACK=TRUE (PR#13762)

2009-06-18 Thread rvaradhan
Full_Name: Ravi Varadhan Version: 2.8.1 OS: Windows Submission from: (NULL) (162.129.251.19) Inverting a matrix with solve(), but using LAPACK=TRUE, gives erroneous results: Here is an example: hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") } h5 <- hilbert(5) h