Re: [Rd] 'R CMD check' fails when suggested package is not available

2007-04-04 Thread Prof Brian Ripley
This is a configurable option 'R_check_force_suggests' documented in 'Writing R Extensions'. This package should be using Enhances: Rmpi, it seems. On Wed, 4 Apr 2007, Herve Pages wrote: > Hi there, > > I was wondering why I get the following error message: > > * checking package dependencies

[Rd] 'R CMD check' fails when suggested package is not available

2007-04-04 Thread Herve Pages
Hi there, I was wondering why I get the following error message: * checking package dependencies ... ERROR Packages required but not available: Rmpi when I run 'R CMD check' on a package that _suggests_ Rmpi? Why isn't it OK to not have all the suggested packages installed? Maybe one of

Re: [Rd] Accessing C++ code from R

2007-04-04 Thread Simon Urbanek
On Apr 4, 2007, at 2:46 PM, Jos Elkink wrote: > Thank you - that indeed fixes the first problem (about cout). It > still leaves the second error, though: > > main.cpp:52: error: brace-enclosed initializer used to initialize > 'R_NativePrimitiveArgType*' > > Any ideas about that? > Sure, do w

Re: [Rd] Exchange of information between functions aside from argument/return-value interface

2007-04-04 Thread Peter Ruckdeschel
Thank you, Luke, once again. >> [snipped away my original message; to be found on >> https://stat.ethz.ch/pipermail/r-devel/2007-April/045219.html] >> Or did I get something wrong? > > I think you did. You seem to be thinking in terms of dynamic scope, > which looks for variables in the caller a

Re: [Rd] Exchange of information between functions aside from argument/return-value interface

2007-04-04 Thread Luke Tierney
On Wed, 4 Apr 2007, Peter Ruckdeschel wrote: > Thank you, Luke, for your promptous response. > > [snipped away my original message; to be found on > https://stat.ethz.ch/pipermail/r-devel/2007-April/045216.html] > >> Sounds like lexical scoping should work for this also -- use <<- to >> assign to

Re: [Rd] Accessing C++ code from R

2007-04-04 Thread Jos Elkink
Hi Simon, Thank you - that indeed fixes the first problem (about cout). It still leaves the second error, though: main.cpp:52: error: brace-enclosed initializer used to initialize 'R_NativePrimitiveArgType*' Any ideas about that? Thanks again for the first suggestion, anyway, and I'll keep your

Re: [Rd] Problem with S4 inheritance: unexpected re-initialization?

2007-04-04 Thread Herve Pages
Hi Christian, cstrato wrote: > Dear Herve > > Thank you for your helpful comments, and I especially appreciate that > you tried to run my package. I will try to answer each point separately. > > Herve Pages wrote: >> Hi Christian, >> >> I can only give you a few reasons why IMO it is very unlike

Re: [Rd] Accessing C++ code from R

2007-04-04 Thread Simon Urbanek
Jos, you omitted the crucial part but my guess would be that all you have to do is to put #include *before* R headers includes (R defines "length" which throws off iostream). Also note that using cout is not a good idea, because it is not captured by R, you should be using Rprintf instead.

Re: [Rd] Exchange of information between functions aside from argument/return-value interface

2007-04-04 Thread Peter Ruckdeschel
Thank you, Luke, for your promptous response. [snipped away my original message; to be found on https://stat.ethz.ch/pipermail/r-devel/2007-April/045216.html] > Sounds like lexical scoping should work for this also -- use <<- to > assign to the variable in the containing scope. > > Best, > > l

Re: [Rd] Exchange of information between functions aside from argument/return-value interface

2007-04-04 Thread Luke Tierney
On Wed, 4 Apr 2007, Peter Ruckdeschel wrote: > Hi R-devels, > > I would like to ask for your advice on the preferred way to exchange > information between functions aside from the regular argument/return-value > interface. > > I am well aware that, S being a functional language, this is to be avoi

[Rd] Accessing C++ code from R

2007-04-04 Thread Jos Elkink
Hi, I am trying to use existing C++ code from R. I have no problems compiling C code and using it in R, but with C++ I'm running into problems. Here's the compiler output: Macintosh-10:~/Desktop/dissertation/Model - CPP version/R labguest$ g++ -I/Library/Frameworks/R.framework/Resources/include

[Rd] Exchange of information between functions aside from argument/return-value interface

2007-04-04 Thread Peter Ruckdeschel
Hi R-devels, I would like to ask for your advice on the preferred way to exchange information between functions aside from the regular argument/return-value interface. I am well aware that, S being a functional language, this is to be avoided where possible. There are exceptions, though: Let myF

Re: [Rd] source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel

2007-04-04 Thread Herve Pages
Duncan Murdoch wrote: > > Thanks for reporting this. > > This is now fixed and committed to svn. It will take a day or two for > the change to make it onto CRAN. OK. Thanks Martin and Duncan! Cheers, H. __ R-devel@r-project.org mailing list https://

Re: [Rd] broken link in posting-guide.html

2007-04-04 Thread Duncan Murdoch
On 4/4/2007 12:10 PM, Paul Gilbert wrote: > There seems to be a broken link at > in the line > > *Technical details of posting*: See General Instructions > for more details of the > following: > Thanks,

[Rd] broken link in posting-guide.html

2007-04-04 Thread Paul Gilbert
There seems to be a broken link at in the line *Technical details of posting*: See General Instructions for more details of the following: Paul Gilbert ===

Re: [Rd] Probem with argument "append" in "Rprof"

2007-04-04 Thread Thomas Lumley
Thanks for this. I will look at it over the weekend. -thomas On Sun, 1 Apr 2007, Romain Francois wrote: > And now I realize I gave the patches in the wrong order, let me try > again > > Cheers, > > Romain > > Romain Francois wrote: >> [forgot to attach the second patch in the fir

Re: [Rd] Problem with S4 inheritance: unexpected re-initialization?

2007-04-04 Thread cstrato
Dear Herve Thank you for your helpful comments, and I especially appreciate that you tried to run my package. I will try to answer each point separately. Herve Pages wrote: Hi Christian, I can only give you a few reasons why IMO it is very unlikely that anybody will be able to help you on this

Re: [Rd] source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel

2007-04-04 Thread Duncan Murdoch
On 4/4/2007 5:21 AM, Martin Maechler wrote: >> "Herve" == Herve Pages <[EMAIL PROTECTED]> >> on Tue, 03 Apr 2007 11:29:25 -0700 writes: > > Herve> Hi, I get this error with R-2.5.0 alpha and R-2.6.0 > Herve> devel: > > >> source("http://bioconductor.org/biocLite.R";, echo=

Re: [Rd] source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel

2007-04-04 Thread Martin Maechler
> "Herve" == Herve Pages <[EMAIL PROTECTED]> > on Tue, 03 Apr 2007 11:29:25 -0700 writes: Herve> Hi, I get this error with R-2.5.0 alpha and R-2.6.0 Herve> devel: >> source("http://bioconductor.org/biocLite.R";, echo=TRUE) Herve> Error in if (timestamp != srcfile$tim

Re: [Rd] Strange number produced by dnorm

2007-04-04 Thread Peter Dalgaard
Tong Wang wrote: > Hi All, > I just started to learn compiling C codes for R usage, and got a problem > when I was playing with my 'hello world' code. > > #include > #include > #include > > SEXP test( ) { > double x; > x=dnorm(1.0,0.0,1.0,1); > printf(" x value is: %d \n",x);

Re: [Rd] R callbacks

2007-04-04 Thread Prof Brian Ripley
On Tue, 3 Apr 2007, Deepayan Sarkar wrote: > On 4/3/07, Simon Urbanek <[EMAIL PROTECTED]> wrote: >> On Apr 2, 2007, at 8:51 PM, Deepayan Sarkar wrote: >> >>> Hi, >>> >>> I'm trying to understand (mostly from the R-exts manual) how to use >>> the callbacks declared in Rinterface.h. As a first attem

Re: [Rd] Strange number produced by dnorm

2007-04-04 Thread Prof Brian Ripley
On Tue, 3 Apr 2007, Tong Wang wrote: > Hi All, >I just started to learn compiling C codes for R usage, and got a > problem when I was playing with my 'hello world' code. > > #include > #include > #include > > SEXP test( ) { > double x; > x=dnorm(1.0,0.0,1.0,1); > printf(" x value is: %

Re: [Rd] Strange number produced by dnorm

2007-04-04 Thread Martin Becker
Hi, I think the only thing that's wrong is "%d" in your printf statement, shouldn't it be "%f"? ("%d" is used for decimal (integer) numbers, "%f" for float (double) numbers) Regards, Martin Tong Wang wrote: > Hi All, > I just started to learn compiling C codes for R usage, and got a pro