[Rd] NAMESPACE and bundle

2006-06-22 Thread Iago Mosqueira
Dear all, I have a package that passes R CMD check, and shows no problems when using all its methods as declared in NAMESPACE. When this package is added to a bundle, which already consists of 5 packages, the examples in the Rd pages thta call a number of methods fail during the bundle check. T

Re: [Rd] .Call and data frames

2006-06-22 Thread Hin-Tak Leung
I think you want else if (TYPEOF(colData) == STRSXP) ... instead. I don't know if this will convert from factors to string's, but somewhere it probably involves something like this: PROTECT(colData = coerceVector(colData, STRSXP)); Dominick Samperi wrote: > Hello, > > I'm trying to

Re: [Rd] .Call and data frames

2006-06-22 Thread Hin-Tak Leung
Hin-Tak Leung wrote: > I think you want > else if (TYPEOF(colData) == STRSXP) > ... instead. > > I don't know if this will convert from factors to string's, > but somewhere it probably involves something like this: > PROTECT(colData = coerceVector(colData, STRSXP)); FWIW, a factor co

Re: [Rd] NAMESPACE and bundle

2006-06-22 Thread Paul Gilbert
Iago There is a problem that bundle checking works slightly differently than individual package checking in this regard. I think it has to do with when the namespace gets registered, or something like that. As I recall, the work around is to explicitely require the package in the test files

Re: [Rd] NAMESPACE and bundle

2006-06-22 Thread Iago Mosqueira
> -Mensaje original- > De: Paul Gilbert [mailto:[EMAIL PROTECTED] > Enviado el: jue 22/06/2006 15:47 > Para: Iago Mosqueira > CC: r-devel@r-project.org > Asunto: Re: [Rd] NAMESPACE and bundle > Iago > There is a problem that bundle checking works slightly differently than > individual p

Re: [Rd] NAMESPACE and bundle

2006-06-22 Thread Paul Gilbert
Iago I think your R code file needs an .onLoad function. Here is the ..onLoad from my dse1 package which is in the dse bundle, as is tframe, along with comments which I had forgotten. ..onLoad <- function(library, section) { .DSEflags(list(COMPILED=TRUE, DUP=TRUE)) # next require is n

Re: [Rd] Suggestion for all.equal.factor

2006-06-22 Thread McGehee, Robert
Errata: As Tony Plate pointed out to me, the patch I had meant to submit was this: if (length(nax) == length(nay) && (n <- sum(nax != nay)) as my previous patch simply assigned a TRUE or FALSE to n rather than the count of NA mismatches. Cheers, Robert -Original Message- From: [EMAIL P

Re: [Rd] .Call and data frames

2006-06-22 Thread Dominick Samperi
Thanks for the tips, This seems to work: First test for isReal and isInteger. If they fail, assume character/factor, and PROECT(colData = coerceVector(colData,INTSXP); // Not STRSXP SEXP names = getAttrib(colData, R_LevelsSymbol); // names now contains the string names I was looking for. ds Hin

Re: [Rd] .Call and data frames

2006-06-22 Thread Kasper Daniel Hansen
On Jun 22, 2006, at 9:04 AM, Dominick Samperi wrote: > Thanks for the tips, > > This seems to work: > First test for isReal and isInteger. > If they fail, assume character/factor, and > > PROECT(colData = coerceVector(colData,INTSXP); // Not STRSXP > SEXP names = getAttrib(colData, R_LevelsSymbol

[Rd] weights in lm, glm (PR#9023)

2006-06-22 Thread jsignoro
Full_Name: James Signorovitch Version: 2.2.1 OS: WinXP Submission from: (NULL) (134.174.182.203) In the code below, fn1() and fn2() fail with the messages given in the comments. Strangely, fn2() fails for all data sets I've tried except for those with 100 rows. The same errors occur if glm() i

Re: [Rd] loading library from network share (PR#8982)

2006-06-22 Thread Tony Plate
I had thought that one needed to be careful using mapped network drive letters to access network shares under MS Windows -- the current mapping for drive letters can depend on who is current logged in. For non-critical interactive sessions there should be no problems with using mapped network

Re: [Rd] weights in lm, glm (PR#9023)

2006-06-22 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: > Full_Name: James Signorovitch > Version: 2.2.1 > OS: WinXP > Submission from: (NULL) (134.174.182.203) > > > In the code below, fn1() and fn2() fail with the messages given in the > comments. > Strangely, fn2() fails for all data sets I've tried except for those wit

Re: [Rd] weights in lm, glm (PR#9023)

2006-06-22 Thread Thomas Lumley
On Thu, 22 Jun 2006, [EMAIL PROTECTED] wrote: > > In the code below, fn1() and fn2() fail with the messages given in the > comments. > Strangely, fn2() fails for all data sets I've tried except for those with 100 > rows. > fn1 <- function(model, data) > { > w <- runif(nrow(data)); > p

Re: [Rd] weights in lm, glm (PR#9023)

2006-06-22 Thread Peter Dalgaard
Thomas Lumley <[EMAIL PROTECTED]> writes: > The other approach is to set the environment of the formula to be the > current environment. This will work as long as the formula doesn't refer > to any variables in its original environment > > environment(model)<-environment() > w<-runif(nr

[Rd] Error - Compiling R on a Sun V40Z - R/R-2.2.1 (PR#9024)

2006-06-22 Thread denny
configure: WARNING: dlfcn.h: present but cannot be compiled configure: WARNING: dlfcn.h: check for missing prerequisite headers? configure: WARNING: dlfcn.h: see the Autoconf documentation configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled" configure: WARNING: dlfcn.h: pro