similar to: Need Advice: Considering Converting a Package from S3 to S4 -- reprise

Displaying 20 results from an estimated 8000 matches similar to: "Need Advice: Considering Converting a Package from S3 to S4 -- reprise"

2009 Aug 13
2
CMD check error (bug?)
R version 2.9.0 running on Centos (Red Hat linux). I have a pair of packages coxme and bdsmatrix. The latter is installed in my local library (I don't have permission for global install at work.) That is, it is in the location pointed to in R_LIBS_USER. In R, the command library(bdsmatrix) works fine. Coxme depends on bdsmatrix, in fact uses some cross-calls to it's C routines, which
2010 Jul 27
0
AIC from coxme
Hi, I am running the following model: fit1.full <- coxme(Surv(age_sym1, sym1) ~ sex + lifedxm*sex + (1|famid), data=bip.surv) I would like to extract the AIC from that object to calculate the AICC. However, when I look at str(fit1.full) and summary(fit1.full) (pasted below) I don't see anything that would allow me to get pull the AIC out from that object. Is there a way to retrieve the
2008 Dec 28
1
Random coefficients model with a covariate: coxme function
Dear R users: I'm new to R and am trying to fit a mixed model Cox regression model with coxme function. I have one two-level factor (treat) and one covariate (covar) and 32 different groups (centers). I'd like to fit a random coefficients model, with treat and covar as fixed factors and a random intercept, random treat effect and random covar slope per center. I haver a couple of
2008 Mar 05
1
coxme - fitting random treatment effect nested within centre
Dear all, I am using "coxme" function in Kinship library to fit random treatment effect nested within centre. I got 3 treatments (0,1,2) and 3 centres. I used following commands, but got an error. > ugroup=paste(rep(1:3,each=3),rep(0:2,3),sep='/') > mat1=bdsmatrix(rep(c(1,1,1,1,1,1,1,1,1),3),blocksize=rep(3,3),dimnames=list(ugroup,ugroup)) >
2009 Aug 05
1
inheriting C symbols
The package coxme depends heavily on bdsmatrix, to the point of needing access to some of its C calls. The kinship package (in progress) uses the R level functions in bdsmatrix, but not the C calls. That is, I don't want to always export the symbols. For testing I can use an explicit dyn.load('somepath/bsdmatrix.so', local=F). How do I incorporate such a dependency in the
2013 Oct 09
1
frailtypack
I can't comment on frailtypack issues, but would like to mention that coxme will handle nested models, contrary to the statement below that "frailtypack is perhaps the only .... for nested survival data". To reprise the original post's model cgd.nfm <- coxme(Surv(Tstart, Tstop, Status) ~ Treatment + (1 | Center/ID), data=cgd.ag) And a note to the poster-- you should
2009 Mar 05
3
Package issue
I've converted the bdsmatrix package (used by coxme) to the newer style of S4, and uploaded it. It is in the pkg directory of survival, on r-forge. I'm stuck on something that is almost certainly a namespace issue. I've borrowed liberally from Matrix (a big help) and read the documentation, and just upgraded to 2.8.1 - but still stuck. All the tests work when I run them "by
2015 Feb 15
2
Imports problem
I'm testing out a new version of coxme and R CMD check fails with "could not find function ranef" (or random.effects or fixef, or anything from nlme). The NAMESPACE file has the line below importFrom(nlme, ranef, random.effects, fixef, fixed.effects, VarCorr) and nlme is declared in the DESCRIPTION file as an import. I feel that I must be staring at some obvious (but
2015 Feb 16
0
Imports problem
>>>>> Therneau, Terry M , Ph D <therneau at mayo.edu> >>>>> on Sun, 15 Feb 2015 17:31:00 -0600 writes: > I'm testing out a new version of coxme and R CMD check fails with "could not find function > ranef" (or random.effects or fixef, or anything from nlme). The NAMESPACE file has the > line below >
2020 Jan 13
0
as-cran issue
On 13/01/2020 11:02 a.m., Therneau, Terry M., Ph.D. via R-devel wrote: > Where can I find out (and replicate) what options as-cran turns on? > > The issue: the following lines generate an error in R CMD check --as-cran? for coxme.? But > there is no error without as-cran nor is there one when I run the code in a terminal window. > > ismat <- function(x)? inherits(x,
2017 Dec 29
1
winbuilder warning message wrt function pointers
And remove the cast on the return value of R_GETCCallable. And check that your function is found before using it. #include <R.h> #include <Rinternals.h> #include <R_ext/Rdynload.h> void bdsmatrix_prod4(int nrow, int nblock, int *bsize, double *bmat, double *rmat, int nfrail, double *y) { DL_FUNC fun = NULL; if (fun==NULL)
2018 Jan 09
1
resolving a names conflict
The survival package uses a generalized cholesky decompostition throughout.? If A is a symmetric matrix A= LDL' where L is lower triangular with 1s on the diagonal, D is diagonal, and D[i,i] =0 if column i of A is redundant.? Being able to read the rank and dependencies directly off of D is very handy. The bdsmatrix package uses the same, but exposes it to the user as gchol and solve
2010 Mar 05
2
Defining a method in two packages
The coxme package has a ranef() method, as does lme4. I'm having trouble getting them to play together, as shown below. (The particular model in the example isn't defensible, but uses a standard data set.) The problem is that most of the time only one of lme4 or coxme will be loaded, so each needs to define the basic ranef function as well as a method for it. But when loaded together
2009 Aug 10
3
Need Advice: Considering Converting a Package from S3 to S4
Hello R Folks... Not a technical question, but I need some advice and perspective. I?ve got a set of functions I?m planning to put together into a package. The main hunk of data that gets used by different functions is currently an S3 list. I?ve been reading about S4 objects, and I see the (numerous) advantages of them. I have seen the recommendation that all new packages be done with S4.
2017 Dec 29
3
winbuilder warning message wrt function pointers
I've recently updated the coxme package, which calls internal routines from the bdsmatrix package.? (It is in fact mentioned as an example of this in the Extensions manual.) The call connections are a blocks like this, one for each of the 9 called C routines. void bdsmatrix_prod4(int nrow,??? int nblock,?? int *bsize, ??????????????????? double *bmat, double *rmat, ??????????????????? int
2009 Mar 05
3
methods package
I'm working on the next version of coxme, one step of which is converting the bdsmatrix library from Splus to R. Actually, it is a conversion from S4 methods as first described in the Green book to S4 methods as they currently exist. Mostly it's going ok, but not entirely. 1. The biggest issue is lack of documentation. The online help pages have not been a help; they keep saying
2017 Dec 29
0
winbuilder warning message wrt function pointers
You can legally cast a function pointer to another function pointer, where the signatures differ. (It is not legal to cast between data and function pointers.) I would make typedefs for the various signatures, as the casting syntax is more readable then. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Dec 29, 2017 at 10:13 AM, Therneau, Terry M., Ph.D. < therneau at mayo.edu> wrote:
2011 Oct 06
1
multiple defines of diag
The current coxme code has functions that depend on bdsmatrix and others that depend on Matrix, both those pacakges define S4 methods for diag. When loaded, the message appears: replacing previous import ?diag? when loading ?Matrix? Questions: 1. Do I need to worry about this? If so, what can I do about it? I suppose I could add an importFrom directive, but it will be a pain unless there
2017 Dec 29
0
winbuilder warning message wrt function pointers
Try changing static void (*fun)() = NULL; to DL_FUNC fun = NULL; Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Dec 29, 2017 at 5:14 AM, Therneau, Terry M., Ph.D. < therneau at mayo.edu> wrote: > I've recently updated the coxme package, which calls internal routines > from the bdsmatrix package. (It is in fact mentioned as an example of this > in the Extensions
2020 Jan 13
0
Error in R CMD check --as-cran ?
I've been fighting a CMD check error for coxme this morning.?? I thought I had it fixed, but instead I had forgotton --as-cran on my last test run.? So the version just submitted to CRAN has warning messages in the log. I think it is an issue with CRAN.?? I've sent a message to R-devel asking for help.?? Since then, as a guess, I renamed my internal "ismat" function to