Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Ross Boylan
See at bottom for an example. On Wed, 2007-07-25 at 11:26 -0700, Jonathan Zhou wrote: > Hi Hin-Tak, > > Here is the R code function in where I called the two C++ and further below > are the 2 C++ functions I used to create the externalptr and use it : > > soam.Rapply <- function (x, func, ..., >

[Rd] loess prediction algorithm

2007-07-25 Thread apjaworski
Hello, I need help with the details of loess prediction algorithm. I would like to get it implemented as a part of a measurement system programmed in LabView. My job is provide a detailed description of the algorithm. This is a simple one-dimensional problem - smoothing an (x, y) data set. I

Re: [Rd] codetools really optional for R CMD check?

2007-07-25 Thread Dirk Eddelbuettel
On Wed, Jul 25, 2007 at 01:29:24PM -0700, Ross Boylan wrote: > After upgrading to R 2.5.1 on Debian, R CMD check gives > * checking Rd cross-references ... WARNING > Error in .find.package(package, lib.loc) : > there is no package called 'codetools' > Execution halted > * checking for missin

[Rd] codetools really optional for R CMD check?

2007-07-25 Thread Ross Boylan
After upgrading to R 2.5.1 on Debian, R CMD check gives * checking Rd cross-references ... WARNING Error in .find.package(package, lib.loc) : there is no package called 'codetools' Execution halted * checking for missing documentation entries ... WARNING etc The NEWS file says (for 2.5.0;

[Rd] glm(...,quasi(link="logit")) problem?

2007-07-25 Thread Simon Wood
There may be a good reason for this, but under R 2.5.1 (Windows XP, Suse Linux) > glm(c(0,.5)~1,quasi(link=logit)) Error: NA/NaN/Inf in foreign function call (arg 4) whereas the same code works under R 2.1.1. The problem (in 2.5.1) is a -Inf in the pseudodata `z' in glm.fit, as a result of a `

Re: [Rd] anova tables in survreg (PR#9806)

2007-07-25 Thread Ben Bolker
sib.uq.edu.au> writes: > To whom it may concern, > > I'm trying to get an ANOVA table within survreg but it always > produces NA's in > the p-value, regardless of the data set. [snip] The problem is fairly clear, but not knowing the larger context I don't know the best way to fix it.

Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Jonathan Zhou
Hi Hin-Tak, Here is the R code function in where I called the two C++ and further below are the 2 C++ functions I used to create the externalptr and use it : soam.Rapply <- function (x, func, ..., join.method=cbind, njobs,

Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Simon Urbanek
On Jul 25, 2007, at 12:53 PM, Jonathan Zhou wrote: > [snip] > extern "C" > { > void soamSubmit (SEXP jobID,//job ID ^^^ - this will definitely crash. All .Call functions must return SEXP, even if it is just R_NilValue; Cheers, Simon >SEXP sesCon,

Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Jonathan Zhou
Hi all, Here is the R code function in where I called the two C++ and further below are the 2 C++ functions I used to create the externalptr and use it : soam.Rapply <- function (x, func, ..., join.method=cbind, njobs,

Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Hin-Tak Leung
As other has commented, without the rest/full of your code it is difficult to tell... I have a few suggestions though: - it is obviously a memory-related issue. An external pointer is partly allocated by R and partly allocated by you - you need to check both parts, and their individual usages.

Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Seth Falcon
Jonathan Zhou <[EMAIL PROTECTED]> writes: > Hi all, > > I've been writing a package and I've run into a problem that I'm unsure how > to solve. I am looking to pass a C++ class object to R so that it may be > passed back to another C++ function later on to be used. I'm quite new to R > and this

Re: [Rd] Using R_MakeExternalPtr

2007-07-25 Thread Simon Urbanek
Jon, I suspect that you're leaving out some important details - please include your R code for inspection as the C++ code below seems ok (although you may want to show us the declarations as well). Also you may want to look into this with a debugger in case the segfault is actually in your

[Rd] Using R_MakeExternalPtr

2007-07-25 Thread Jonathan Zhou
Hi all, I've been writing a package and I've run into a problem that I'm unsure how to solve. I am looking to pass a C++ class object to R so that it may be passed back to another C++ function later on to be used. I'm quite new to R and this is my first time writing a package, so I hope you ca

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Achim Zeileis
Paul, thanks for the feedback. Concerning the zoo side: > >Currently, the "zoo" implementation allows this: Coercing back and forth > >gives: > > library("zoo") > > z1 <- as.ts(aggregate(as.zoo(x1), as.yearqtr, sum)) > > z2 <- as.ts(aggregate(as.zoo(x2), as.yearqtr, sum)) > > > > > This is bet

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Gabor Grothendieck
On 7/25/07, Paul Gilbert <[EMAIL PROTECTED]> wrote: > (moved from r-help) > > Achim Zeileis wrote: > > >On Wed, 25 Jul 2007, laimonis wrote: > > > > > > > >>Consider the following scrap of code: > >> > >> > > > >...slightly modified to > > x1 <- ts(1:24, start = c(2000, 10), freq = 12) > > x2 <-

Re: [Rd] [R] aggregate.ts

2007-07-25 Thread Paul Gilbert
(moved from r-help) Achim Zeileis wrote: >On Wed, 25 Jul 2007, laimonis wrote: > > > >>Consider the following scrap of code: >> >> > >...slightly modified to > x1 <- ts(1:24, start = c(2000, 10), freq = 12) > x2 <- ts(1:24, start = c(2000, 11), freq = 12) > >and then > y1 <- aggregate(x1

[Rd] anova tables in survreg (PR#9806)

2007-07-25 Thread a . manners
Full_Name: Andrew Manners Version: 2.5.1 OS: windows xp prof 2003 Submission from: (NULL) (130.102.0.177) To whom it may concern, I'm trying to get an ANOVA table within survreg but it always produces NA's in the p-value, regardless of the data set. The data set below comes from Tableman and Ki

Re: [Rd] Accuracy of qt for df=1 (PR#9804)

2007-07-25 Thread maechler
> "MW" == Morten Welinder <[EMAIL PROTECTED]> > on Tue, 24 Jul 2007 17:18:09 +0200 (CEST) writes: MW> Full_Name: Morten Welinder MW> Version: 2.2.0 MW> OS: Linux MW> Submission from: (NULL) (216.223.241.229) MW> The qt function for df=1 is implemented as... M

Re: [Rd] sweep sanity checking?

2007-07-25 Thread Petr Savicky
I would like to suggest a patch against R-devel-2007-07-24, which modifies function sweep by including a warning, if dim(STATS) is not consistent with dim(x)[MARGIN]. If check.margin=FALSE, the simple test whether prod(dim(x)[MARGIN]) is a multiple of length(STATS) is performed. If check.margin=TRU