similar to: Problem with factor state when subset()ing a data frame

Displaying 20 results from an estimated 10000 matches similar to: "Problem with factor state when subset()ing a data frame"

2007 Feb 08
1
Problem with factor state when subset()ing a data.frame
Hi folks, I am running into a problem when calling subset() on a large data.frame. One of the columns contains strings which are used as factors. R seems to automatically factor the column when the data.frame is contstructed, and this appears to not get updated when I create a subset of the table. A minimal testcase to demonstrate the problem follows: sample <- data.frame(c("A",
2006 May 12
2
reusing routines
I've created some Splus code for a microarray problem that - needed to be in C, to take advantage of some sparse matrix properties - uses a cholesky decompostion as part of the computation For the cholesky, I used the cholesky2 routine, which is a part of the survival library. It does just what I want and I'm familiar with it (after all, I wrote it). In Splus, this all works
2006 Jul 05
0
Problem with coxme
------------- Begin Forwarded Message ------------- Date: Wed, 5 Jul 2006 09:09:14 -0500 (CDT) From: Terry Therneau <therneau at mayo.edu> Subject: RE: Problem with coxme To: jhz22 at medschl.cam.ac.uk Cc: R-help at stat.mat.ethz.ch, liulei at virginia.edu, spencer.graves at pdf.com Content-MD5: BXKVsHtW/1I9mIUqrXBU0g== The original question involved a strange error message from coxme
2020 Oct 26
1
temporary clipping
In one of my plot functions it is convenient to use clipping to restrict the range of some output. But at the end of the function I'd like to turn it off, i.e., so that a subsequent use of legend(), text() or whatever is not affected. I don't quite see how to do this -- it seems that the only way to turn off clip is with a new plot. -- Terry M Therneau, PhD Department of Health
2024 Mar 11
2
Vignettes with long compute time
Is there a way to include the compiled version of a vignette in the doc directory but mark it to NOT be rerun by CRAN??? I think I remember that this is possible, but have forgotton how.?? (It might even be a false memory.) Terry T. Background:? Beth Atkinson and I are splitting out many of the vignettes from the survival package into a separate package survivalVignettes.? There are a few
2013 Nov 04
0
Fwd: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model?
-------- Original Message -------- Subject: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model? Date: Mon, 04 Nov 2013 17:27:04 -0600 From: Terry Therneau <therneau.terry at mayo.edu> To: Y <yuhanusa at gmail.com> The cumulative hazard is just -log(sfit$surv). The hazard is essentially a density estimate, and that is much harder. You'll notice
2020 Sep 25
1
Extra "Note" in CRAN submission
When I run R CMD check on the survival package I invariably get a note: ... * checking for file ?survival/DESCRIPTION? ... OK * this is package ?survival? version ?3.2-6? * checking CRAN incoming feasibility ... NOTE Maintainer: ?Terry M Therneau <therneau.terry at mayo.edu>? ... This is sufficient for the auto-check process to return the following failure message: Dear maintainer,
2006 Jul 07
0
graphlets
Naras presented something with similar functionalities using SVG a couple of years ago, and since then the svgdevice package had been made available. I do not know SVG myself, but according to Naras, it's all possible. Best, Andy From: Terry Therneau > > I have an application where the Splus graphlets() package > would work very well, and would like to know if there is any
2024 Feb 07
2
Difficult debug
I haven't done any R memory debugging lately, but https://www.mail-archive.com/rcpp-devel at lists.r-forge.r-project.org/msg10289.html shows how I used to have gdb break where valgrind finds a problem so you could examine the details. Also, running your code after running gctorture(TRUE) can help track down memory problems. -Bill On Wed, Feb 7, 2024 at 12:03?PM Therneau, Terry M., Ph.D.
2019 Sep 06
2
install_github and survival
I cloned therneau/survival and the installation failed since there is no definition for exported function survfit(). A file seems to be missing - there is survfit0() and survfit0.R but, compared to CRAN, no survfit.R. Georgi Boshnakov ---------------------------------------------------------------------- Message: 1 Date: Thu, 05 Sep 2019 12:53:11 -0500 From: "Therneau, Terry M.,
2024 Feb 07
2
Difficult debug
?I've hit a roadblock debugging a new update to the survival package.?? I do debugging in a developement envinment, i.e. I don't create and load a package but rather? source all the .R files and dyn.load an .so file, which makes things a bit easier. ? Running with R -d "valgrind --tool=memcheck --leak-check=full" one of my test files crashes in simple R code a dozen lines
2020 Oct 24
3
Issue with data() function
I found an issue with the data() command this evening when working on the survival package. 1. I have a lot of data sets in the package, almost all used in at least one vignette, help file, or test.? As a space saving measure, I have bundled many of them together, i.e., the file data/cancer.rda contains 19 data sets, many of them small. The resulting file (using xz compression) is quite a bit
2004 Jul 23
1
Porting plotterm() & gamterms() from s-plus
I'm trying to plot pspline'd explanatory variables from coxph() models as per Therneau and Grambsch (Modeling Survival Data: Extending the Cox Model). They have s-plus functions for this at: http://www.mayo.edu/hsr/people/therneau/book/sfunction/gamterms.s http://www.mayo.edu/hsr/people/therneau/book/sfunction/plotterm.s I'd like to make these plots in R, but they make use of non-R
2019 Sep 06
0
[EXTERNAL] RE: install_github and survival
Yes, that is exactly the problem.? The code found in the "config" script is never run.? But why doesn't it get run? On 9/6/19 5:44 AM, Georgi Boshnakov wrote: > I cloned therneau/survival and the installation failed since there is no definition for exported function survfit(). > A file seems to be missing - there is survfit0() and survfit0.R but, compared to CRAN, no
2006 Nov 13
0
Confidence intervals for relative risk
Wolfgang, It is common to handle relative risk problems using Poisson regression. In your example you have 8 events out of 508 tries, and 0/500 in the second data set. > tdata <- data.frame(y=c(8,0), n=c(508,500), group=1:0) > fit <- glm(y ~ group + offset(log(n)), data=tdata, family=poisson) Because of the zero, the standard beta/se(beta) confidence intervals don't work.
2009 Oct 01
0
General mixed effects Cox models
After an extremely long gestation, a new version of the coxme package is now available on CRAN. This function fits very general mixed-effects Cox models using an lmer-like syntax. For instance here is a model that fits a random treatment effect, using data from a multi-study collaboration. fit <- coxme(Surv(pg.time, pg.stat) ~ stage + trt + (trt|site) + stata(site), data=
2009 Oct 01
0
General mixed effects Cox models
After an extremely long gestation, a new version of the coxme package is now available on CRAN. This function fits very general mixed-effects Cox models using an lmer-like syntax. For instance here is a model that fits a random treatment effect, using data from a multi-study collaboration. fit <- coxme(Surv(pg.time, pg.stat) ~ stage + trt + (trt|site) + stata(site), data=
2015 May 15
0
Installation error with R-devel
It's hard to diagnose this without your package sources / a reproducible example. Shot in the dark: one thing worth checking is that you don't have an entry in your `.Rbuildignore` that's removing files you don't expect it to (maybe that's causing R to strip out the 'doc/index.html' file) Kevin On Fri, May 15, 2015 at 12:54 PM, Therneau, Terry M., Ph.D. <therneau
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:
2007 Apr 23
2
stringsAsFactor global option (was "character coerced to a factor")
--- Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > Just one caveat. I personally would try to avoid > using > global options since it can cause conflicts when > two different programs assume two different settings > of the same global option and need to interact. I see this argument often, and don't buy it. In any case, for this particular option, the