Re: [Rd] [EXTERNAL] Re: Request for comment: namespace resolution in terms(, specials=) [::, etc.]

2025-04-15 Thread Therneau, Terry M., Ph.D. via R-devel
Peter,    I had an argument with someone at one of the big companies (google?) several years ago over the coding standard you mention, who was claiming that the survival package had a bug due to a wrong result using survival::strata() in a formula.   I argued back. I agree with you that names

[Rd] Problems with ::

2025-03-19 Thread Therneau, Terry M., Ph.D. via R-devel
In response to the tidyverse habit of adding another zillion functions to one's search space, the use of things like survival::coxph is becoming more common. But this practice breaks the use of the specials argument in terms.formula, something that I make heavy use of in the survival package.

[Rd] Changes in the survival package (long)

2024-12-15 Thread Therneau, Terry M., Ph.D. via R-devel
d patience as we have worked through the reverse dependency checks. Current on github and (hopefully soon) on CRAN. An unaswered question is how to best document this behaviour so that users will find it. Terry Therneau [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Possible update to survival

2024-09-14 Thread Therneau, Terry M., Ph.D. via R-devel
I got good feedback from the list about a scope issue, so I am coming back for more. Prior issue: users who type survival::coxph(survival::Surv(time, status) ~ x1 + x2 + surv ival::strata(group), data=mydata) This messes up the character string matching for strata, done via tt <- terms(formu

Re: [Rd] specials and ::

2024-08-27 Thread Therneau, Terry M., Ph.D. via R-devel
4570.10780.8521 > > > Or, to be facetious: > >> lm(y~base::"+"(x,z)) > Call: > lm(formula = y ~ base::"+"(x, z)) > > Coefficients: > (Intercept) base::"+"(x, z) > 0.4516 0.4383 >

Re: [Rd] specials and ::

2024-08-26 Thread Therneau, Terry M., Ph.D. via R-devel
likes to do…) Terry T From: Josiah Parry Date: Monday, August 26, 2024 at 5:09 PM To: Therneau, Terry M., Ph.D. Cc: r-devel@r-project.org Subject: [EXTERNAL] Re: [Rd] specials and :: I wouldn't go so far as to call people who don't want to wholesale attach namespaces as "nuts.&

Re: [Rd] specials and ::

2024-08-26 Thread Therneau, Terry M., Ph.D. via R-devel
Thanks to all for the responses. A couple notes It is nice to get the overall feedback that I'm not nuts to be terribly annoyed by this, and don't need to fix it tomorrow. Berwin 's note brings to mind the old adage that "The reason it is so hard to make things foolproof is that fools are so

[Rd] specials and ::

2024-08-26 Thread Therneau, Terry M., Ph.D. via R-devel
hat it was company policy to qualify everything. I don't see an easy way to fix survival, and even if I did it would be a tremendous amout of work.   What are other's thoughts? Terry -- Terry M Therneau, PhD Department of Quantitative Health Sciences Mayo Clinic thern...@ma

[Rd] Fixing a CRAN note

2024-06-26 Thread Therneau, Terry M., Ph.D. via R-devel
g CRAN incoming feasibility ... [7s/18s] NOTE Maintainer: ‘Terry Therneau ’ Found the following \keyword or \concept entries which likely give several index terms:   File ‘deming.Rd’:     \keyword{models, regression} * checking package namespace information ... OK * checking package dependencies ... OK .

Re: [Rd] [EXTERNAL] Re: Hard crash of lme4 in R-devel

2024-06-15 Thread Therneau, Terry M., Ph.D. via R-devel
Thank you.  An update of lme4 fixed the issue.  No warning, no crash. On 6/15/24 2:06 AM, Ivan Krylov wrote: В Sat, 15 Jun 2024 02:04:31 + "Therneau, Terry M., Ph.D. via R-devel" пишет: other attached packages: [1] lme4_1.1-35.1 Matrix_1.7-0 I see you have a new Matrix (1.7-0

[Rd] Hard crash of lme4 in R-devel

2024-06-14 Thread Therneau, Terry M., Ph.D. via R-devel
I ran across this by accident when working up an example.It uses a data set from the survival package, but nothing else from there. Fails on the Intel machine shown below, and on a virtual linux instance on a newer Mac. Terry > library(survival) > library(lme4) Loading required package: Ma

Re: [Rd] Petition to set warnPartialMatch* options to TRUE

2024-04-23 Thread Therneau, Terry M., Ph.D. via R-devel
in that context. Terry T -- Terry M Therneau, PhD Department of Quantitative Health Sciences Mayo Clinic thern...@mayo.edu "TERR-ree THUR-noh" [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Vignettes with long compute time

2024-03-11 Thread Therneau, Terry M., Ph.D. via R-devel
tte in particular is talking about compute time, and illustrates a cases where an O(n^2) case arises.   As sentence that warns the use "of you do this it will take hours to run" is a perfect case for a pdf that should not be recreated by R CMD check. -- Terry M Therneau, PhD Dep

Re: [Rd] Difficult debug - follow-up

2024-02-19 Thread Therneau, Terry M., Ph.D. via R-devel
I want to thank Ivan and Bill for useful advice.   I eventually found my memory mistake, which was of the 'obvious once you see it' variety.  Ivan's note that it appeared to be in a small allocation was correct. >   I've hit a roadblock debugging a new update to the survival package. I do > de

[Rd] Difficult debug

2024-02-07 Thread Therneau, Terry M., Ph.D. via R-devel
midstream", i.e., swap from one curve to another mid-followup make the code more complex.   This arises out of the "extended Kaplan-Meier"; I am not a fan of this statistically, but some will use it and expect my code to work. -- Terry M Therneau, PhD Department of Quantitative Heal

Re: [Rd] as.Date withoug "origin"

2022-11-03 Thread Therneau, Terry M., Ph.D. via R-devel
selection processes for choosing among ending dates. Terry T. -- Terry M Therneau, PhD Department of Quantitative Health Sciences Mayo Clinic thern...@mayo.edu "TERR-ree THUR-noh" [[alternative HTML version deleted]] __ R-devel@r-p

[Rd] Question about the UCRT switch

2021-12-09 Thread Therneau, Terry M., Ph.D. via R-devel
ut I never use Windows.   My reading of "the following lines" is that  I don't have to do anything.   Is this correct? Terry T. -- Terry M Therneau, PhD Department of Quantitative Health Sciences Mayo Clinic thern...@mayo.edu "TERR-ree THUR-noh"

[Rd] Issues with drop.terms

2021-08-23 Thread Therneau, Terry M., Ph.D. via R-devel
fix for 3 is not clear to me.  It currently leads to failure in a coxph call that includes a strata so I am directly interested in a solution; e.g.,  coxph(Surv(time, status) ~ age + (ph.ecog==2) + strata(inst), data=lung) Terry T -- Terry M Therneau, PhD Department of Quantitative Health

[Rd] problems with [.terms

2021-08-21 Thread Therneau, Terry M., Ph.D. via R-devel
could try to create a formal patch, though that is not something I have done before. Terry T. -- \documentclass [11pt]{article} \newcommand{\code}[1]{\texttt{#1}} \title{Subscripting a terms object} \author{Terry Therneau} \begin{document} \maketitle <>= options(continue=&#x

Re: [Rd] [EXTERNAL] Re: inheritance and attach

2021-03-15 Thread Therneau, Terry M., Ph.D. via R-devel
ers, > Simon > > > >> On Mar 16, 2021, at 7:19 AM, Therneau, Terry M., Ph.D. via R-devel >> wrote: >> >> This change in R-devel just bit me. Under the newest release, if I >> attach() another >> .RData directory, the methods are not detected

[Rd] inheritance and attach

2021-03-15 Thread Therneau, Terry M., Ph.D. via R-devel
uot;c('double', 'numeric')" ---- The use case was my local test environment for the survival package.  I can work around it. -- Terry M Therneau, PhD Department of Health Science Research Mayo Clinic thern...@mayo.edu "TERR-ree TH

Re: [Rd] Compression (really about LazyDate)

2021-02-19 Thread Therneau, Terry M., Ph.D. via R-devel
Thank you Brian.   I had not quite grasped how the process works, now the descriptions and usage make sense. Terry On 2/19/21 4:28 AM, Prof Brian Ripley wrote: > On 18/02/2021 18:30, Therneau, Terry M., Ph.D. via R-devel wrote: >> This is a CRAN question: >> >> I have t

[Rd] reverse dependency checks

2021-02-18 Thread Therneau, Terry M., Ph.D. via R-devel
fTeX error (\pdfsetmatrix): Unrecognized format.. \AtBegShi@Output ...ipout \box \AtBeginShipoutBox   \fi \fi A check of kpsewhich shows I have all the packages, and I don't see a pattern in the .tex files at the point of failure. Terry T. -- Te

[Rd] Compression

2021-02-18 Thread Therneau, Terry M., Ph.D. via R-devel
This is a CRAN question: I have taken care to compress files in the data directory using "xz" (and checked that it is the best).  Is there then any impact or use for the LazyDataCompression option in the DESCRIPTION file? -- Terry M Therneau, PhD Department of Health Science Res

[Rd] issue with data()

2021-02-16 Thread Therneau, Terry M., Ph.D. via R-devel
ibrary(x) statements for  !(x %in% recommended).   I am guessing that this would also break many dependent packages. Terry T. -- Terry M Therneau, PhD Department of Health Science Research Mayo Clinic thern...@mayo.edu "TERR-ree THUR-noh" [[alternative HTML version de

Re: [Rd] .Fortran to .Call

2020-12-28 Thread Therneau, Terry M., Ph.D. via R-devel
rd to track down. -- Terry M Therneau, PhD Department of Health Science Research Mayo Clinic thern...@mayo.edu "TERR-ree THUR-noh" [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mai

Re: [Rd] [R/S-PLUS] [EXTERNAL] Re: [External] anonymous functions

2020-12-07 Thread Therneau, Terry M., Ph.D. via R-devel
dyverse but not > with others). And of course none work in sapply or lapply. Providing a > shorthand in base may help to improve this. You don't have to use it > if you don't want to, and you can establish coding standards that > disallow it if you like. > > Best, >

[Rd] anonymous functions

2020-12-07 Thread Therneau, Terry M., Ph.D. via R-devel
ew feature in the survival package now adds more lines of comments or other documentation than lines of code. If I have to puzzle out what a line does, what about the poor sod who inherits the maintainance? -- Terry M Therneau, PhD Department of Health Science Research Mayo Clinic thern...@mayo.edu &q

Re: [Rd] Issue with data() function

2020-10-25 Thread Therneau, Terry M., Ph.D. via R-devel
a single .rda file does save space, but it causes some issues with data().   The overall tarball goes from 7480 to 6100 in size (ls -s).   Terry On 10/24/20 4:28 AM, Duncan Murdoch wrote: > On 23/10/2020 9:25 p.m., Therneau, Terry M., Ph.D. via R-devel wrote: >> I found an issue with

[Rd] Issue with data() function

2020-10-23 Thread Therneau, Terry M., Ph.D. via R-devel
urvivaldata' is of course one route, and is suggested in the "Writing R Extensions" guide.  But this is not possible since survival is a recommended package: it can't load any non-recommended package for it's tests or vignettes.  Longer term, perhaps there is way around

[Rd] Extra "Note" in CRAN submission

2020-09-25 Thread Therneau, Terry M., Ph.D. via R-devel
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 ’ ... This is sufficient for the auto-check

[Rd] CRAN checks and ASAN

2020-06-11 Thread Therneau, Terry M., Ph.D. via R-devel
I have a version of R-devel on my development box that has the address sanitizer turned on.   This was instrumental in finding a pair of subtle memory issues.  (I had read, but never written, one element past the end of an array, which caused issues on some architectures.) 1. I now get a end

[Rd] ASAN

2020-04-07 Thread Therneau, Terry M., Ph.D. via R-devel
_PRELOAD. ERROR: loading failed * removing ‘/usr/local/src/R-devel/library/MASS’ It's not quite clear to me what to do next. Terry Therneau [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] survival bug? - solved

2020-03-05 Thread Therneau, Terry M., Ph.D. via R-devel
 I ended up finding the issue by a focused code review. Once in the past, I had a version that would fail under one architecture but not another, in that case some help from Brian Ripley pointed me to the offending line of C code.   That line read, but did not write, at an invalid memory loca

[Rd] rounding change

2020-03-05 Thread Therneau, Terry M., Ph.D. via R-devel
This is a small heads up for package maintainers.   Under the more recent R-devel, R CMD check turned up some changes in the *.out files.   The simple demonstration is to type  "round(51/80, 3)", which gives .638 under the old and .637 under the new.   (One of my coxph test cases has a concor

[Rd] survival bug?

2020-03-03 Thread Therneau, Terry M., Ph.D. via R-devel
My latest submission of survival3.1-10 to CRAN fails  a check, but only on windows, which I don't use. How do I track this down? The test in question works fine on my Linux box. Terry [[alternative HTML version deleted]] __ R-devel@r-projec

Re: [Rd] specials issue, a heads up

2020-02-24 Thread Therneau, Terry M., Ph.D. via R-devel
alling model.frame, so that it does not try to call cluster? Another approach I tried was not exporting cluster(), but that fails when model.frame tries to call it. Terry On 2/24/20 12:21 PM, Duncan Murdoch wrote: > On 24/02/2020 8:55 a.m., Therneau, Terry M., Ph.D. via R-devel wrote:

[Rd] specials issue, a heads up

2020-02-24 Thread Therneau, Terry M., Ph.D. via R-devel
I recently had a long argument wrt the survival package, namely that the following code didn't do what they expected, and so they reported it as a bug   survival::coxph( survival::Surv(time, status) ~ age + sex + survival::strata(inst), data=lung) a. The Google R style guide  recommends that

Re: [Rd] as-cran issue, SOLVED

2020-01-13 Thread Therneau, Terry M., Ph.D. via R-devel
Thank you to all who replied with helpful suggestions.   I had to run off to meetings and talks for a bit so am now processing it all. 1. It turns out that the issue was not with coxme, but with bsdmatrix, a package that coxme calls.  It just happens to have a function ismat() with the same ge

Re: [Rd] as-cran issue

2020-01-13 Thread Therneau, Terry M., Ph.D. via R-devel
rk Eddelbuettel wrote: On 13 January 2020 at 10:02, Therneau, Terry M., Ph.D. via R-devel wrote: | Where can I find out (and replicate) what options as-cran turns on? See the file src/library/tools/R/check.R in the R sources, and grep for as_cran which is the internal variable controlled by the -

[Rd] Error in R CMD check --as-cran ?

2020-01-13 Thread Therneau, Terry M., Ph.D. via R-devel
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

[Rd] as-cran issue

2020-01-13 Thread Therneau, Terry M., Ph.D. via R-devel
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, "matrix"

Re: [Rd] error in [.terms

2019-10-07 Thread Therneau, Terry M., Ph.D. via R-devel
As a footnote, the update.formula function shares one of the flaws I mentioned in the earlier post > test <-  y ~ x1 + (x2=='abc') + x3 > update(test, . ~ .-x3) y ~ x1 + x2 == "abc" The original formula is valid but the updated one is not. Terry T. [[alternative HTML version delete

[Rd] Error in [.terms

2019-10-04 Thread Therneau, Terry M., Ph.D. via R-devel
Martin,   There are a couple of issues with [.terms that have bitten my survival code.  At the useR conference I promised you a detailed (readable) explanation, and have been lax in getting it to you. The error was first pointed out in a bugzilla note from 2016, by the way.  The current sur

Re: [Rd] [EXTERNAL] Re: RE: install_github and survival

2019-09-06 Thread Therneau, Terry M., Ph.D. via R-devel
Many thanks.  Something obvious is sometimes the hardest thing for me to see. Terry On 9/6/19 7:10 AM, Iñaki Ucar wrote: > On Fri, 6 Sep 2019 at 14:08, Therneau, Terry M., Ph.D. via R-devel > wrote: >> Yes, that is exactly the problem. The code found in the "config" s

Re: [Rd] [EXTERNAL] RE: install_github and survival

2019-09-06 Thread Therneau, Terry M., Ph.D. via R-devel
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 surv

[Rd] install_github and survival

2019-09-05 Thread Therneau, Terry M., Ph.D. via R-devel
I treat CRAN as the main repository for survival, but I have also had a github (therneau/survival) version for a couple of years.  It has a vignette2 directory, for instance, that contains extra vignettes that either take too long to run or depend on other packages.  It also gets updated more

[Rd] reverse dependency checks

2019-09-03 Thread Therneau, Terry M., Ph.D. via R-devel
bioconductor). Any pointers? Terry Therneau [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] R CMD check issue

2019-08-28 Thread Therneau, Terry M., Ph.D. via R-devel
7; failed with diagnostics: length of 'dimnames' [1] not equal to array extent --- failed re-building ‘timeSplitter.Rmd’ SUMMARY: processing the following file failed:   ‘timeSplitter.Rmd’ Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... OK * DO

[Rd] problem with R CMD check

2019-08-23 Thread Therneau, Terry M., Ph.D. via R-devel
For a new release of survival, I normally run  R CMD check for every one of the packages that depend on survival  (forewarned is forearmed). I updated R-devel on the test machine this morning, and R CMD check --as-cran survival_3.0-9.tar.gz works as desired. When I run the check routine on any

Re: [Rd] [EXTERNAL] Re: Potential bug in update.formula when updating offsets

2019-08-06 Thread Therneau, Terry M., Ph.D. via R-devel
Yes, it is almost certainly the same issue.  At useR I promised Martin that I would put together a clear example and fix for him and I have not yet done so.  I will try to do that this week.   The heart of the issue is that in a terms object the offset expression will apear in the 'variable

[Rd] ASAN error with R-devel

2019-07-01 Thread Therneau, Terry M., Ph.D. via R-devel
ntributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q(

[Rd] memory access question

2019-06-29 Thread Therneau, Terry M., Ph.D. via R-devel
I had a problem with the latest iteration of the survival package  (one that I hope to post to Github next week) where it would die in strange ways, i.e., work on one box and not on another, a vignette would compile if I invoked Sweave myself but fail in R CMD build, etc.   The type of thing

[Rd] making a vignette optional

2019-06-18 Thread Therneau, Terry M., Ph.D. via R-devel
I had added a vignette to the coxme package and all worked well locally, but it failed at CRAN. The issue is that the vignette involves using coxme for pedigree data, it doesn't work without the kinship2 package, and I hadn't put in the necessary "if (require(" logic. The question is

Re: [Rd] [EXTERNAL] Re: survival changes

2019-06-01 Thread Therneau, Terry M., Ph.D. via R-devel
On 6/1/19 1:32 PM, Marc Schwartz wrote: On Jun 1, 2019, at 12:59 PM, Peter Langfelder wrote: On Sat, Jun 1, 2019 at 3:22 AM Therneau, Terry M., Ph.D. via R-devel wrote: In the next version of the survival package I intend to make a non-upwardly compatable change to the survfit object

[Rd] survival changes

2019-06-01 Thread Therneau, Terry M., Ph.D. via R-devel
In the next version of the survival package I intend to make a non-upwardly compatable change to the survfit object.  With over 600 dependent packages this is not something to take lightly, and I am currently undecided about the best way to go about it.  I'm looking for advice. The change: 2

Re: [Rd] all.equal failure and [.terms

2019-04-05 Thread Therneau, Terry M., Ph.D. via R-devel
The all.equal was a side issue for me; I don't have strong opinions one way or the other.  You are welcome to leave me out of the loop on that.  (Or leave me on the cc, whatever is easiest).  I will update the survival package once the [.terms issues are addressed.  One debatable issues is

Re: [Rd] [EXTERNAL] Re: Re: all.equal failure

2019-04-05 Thread Therneau, Terry M., Ph.D. via R-devel
On 4/5/19 9:39 AM, Duncan Murdoch wrote: On 05/04/2019 10:19 a.m., Therneau, Terry M., Ph.D. wrote: Duncan,    I should have included it in my original note, but       all.equal(unclass(t0x), unclass(t1x)) returns TRUE as well.  I had tried that as well.   But a further look at

Re: [Rd] [EXTERNAL] Re: all.equal failure

2019-04-05 Thread Therneau, Terry M., Ph.D. via R-devel
wrote: > On 05/04/2019 9:03 a.m., Therneau, Terry M., Ph.D. via R-devel wrote: >> This arose in testing [.terms and has me confused. >> >> data(esoph)   # use a standard data set >> >> t0x <- terms(model.frame( ~ tobgp, data=esoph)) >> t1 <-  t

[Rd] [.terms issue

2019-04-05 Thread Therneau, Terry M., Ph.D. via R-devel
As  footnote, the error in survival:::untangle.specials is that it assumed that if attr(myterms, 'specials')[['strata']] was = to 4, then one could use myterms[-4] to remove the strata term.   Not so.   In the model  y ~  x1 + x2 + strata(x3)  the attritube will be 4 -- the response counts --

[Rd] all.equal failure

2019-04-05 Thread Therneau, Terry M., Ph.D. via R-devel
This arose in testing [.terms and has me confused. data(esoph)   # use a standard data set t0x <- terms(model.frame( ~ tobgp, data=esoph)) t1 <-  terms(model.frame(ncases ~ agegp + tobgp, data=esoph)) t1x <- (delete.response(t1))[-1] > all.equal(t0x, t1x) [1] TRUE # the above is wrong, because

[Rd] subscripting a terms object

2019-04-04 Thread Therneau, Terry M., Ph.D. via R-devel
Someone sent me a bug report for survival2.44.1-1 that involves a model with both cluster and offset.  It turns out to be a 3 part issue with [.terms and my own untangle.specials routine.   I've spent an evening sorting out the details.   1. The delete.response() function doesn't remove the

Re: [Rd] [EXTERNAL] Re: issue with latest release of R-devel

2019-03-28 Thread Therneau, Terry M., Ph.D. via R-devel
export _R_RNG_VERSION_=3.5.0 > > might remove/explain those errors. > > Just a thought > > Henrik > > On Wed, Mar 27, 2019 at 8:16 PM Therneau, Terry M., Ph.D. via R-devel > wrote: >> I'm getting ready to submit an update of survival, and is my habit I ru

Re: [Rd] default for 'signif.stars'

2019-03-28 Thread Therneau, Terry M., Ph.D. via R-devel
The addition of significant stars was, in my opinion, one of the worst defaults ever added to R.   I would be delighted to see it removed, or at least change the default.  It is one of the few overrides that I have argued to add to our site-wide defaults file. My bias comes from 30+ years in a

[Rd] issue with latest release of R-devel

2019-03-27 Thread Therneau, Terry M., Ph.D. via R-devel
I'm getting ready to submit an update of survival, and is my habit I run the checks on all packages that depend/import/suggest  survival.  I am getting some very odd behaviour wrt non-reproducability.  It came to a head when some things failed on one machine and worked on another.   I found t

Re: [Rd] as.data.frame.table() does not recognize default.stringsAsFactors()

2019-03-15 Thread Therneau, Terry M., Ph.D. via R-devel
Peter, we are arguing at cross purposes.  My point was that if I have specified options(stringsAsFactors=FALSE) that is a statement to R to NOT DO THIS.   Your argument in return is that "yes, Therneau said that, but in this case he almost certainly doesn't really mean it, so

Re: [Rd] as.data.frame.table() does not recognize default.stringsAsFactors()

2019-03-15 Thread Therneau, Terry M., Ph.D. via R-devel
I have to disagree with both Peter and Martin on this. The underneath issue is that the automatic conversion of characters to factors by the data.frame functions was the single most egregious design blunder in the Statistical Models in S book, and we are still living with it.  The stringsAsFac

[Rd] Hex sticker

2019-01-22 Thread Therneau, Terry M., Ph.D. via R-devel
Is there a canonical place to add a hex sticker to a package?    I've found use of man/figures and inst/. A nice sticker has been made for survival and since it is a required package I don't want to mess it up. Terry T. [[alternative HTML version deleted]] __

[Rd] issue with testInstalledPackage

2018-11-26 Thread Therneau, Terry M., Ph.D. via R-devel
Background: I run tools::testInstalledPackage on all packages that dependend on survival (605 as of today) before sending a new release to CRAN. It has a few false positives which I then follow up on.  (Mostly packages with as-yet-incomplete tests in their inst directory).  Issue: testInstal

[Rd] invisible functions

2018-10-16 Thread Therneau, Terry M., Ph.D. via R-devel
The survival package, like many others, has several helper functions that are not declared in the namespace, since their only use is to be called by other "main" functions of the package.  This works well since the functions in the survival namespace can see them --- without ::: arguments ---

Re: [Rd] maximum matrix size

2018-10-03 Thread Therneau, Terry M., Ph.D. via R-devel
nts.html#Long-vectors > > One thing I seem to remember but cannot find a reference for is that > long vectors can only be passed to .Call calls, not C/Fortran. I > remember rewriting .C() in my WGCNA package to .Call for this very > reason but perhaps the restriction has been rem

[Rd] maximum matrix size

2018-10-02 Thread Therneau, Terry M., Ph.D. via R-devel
I am now getting the occasional complaint about survival routines that are not able to handle big data.   I looked in the manuals to try and update my understanding of max vector size, max matrix, max data set, etc; but it is either not there or I missed it (the latter more likely).   Is it s

Re: [Rd] new behavior in model.response -- Solved

2018-06-28 Thread Therneau, Terry M., Ph.D. via R-devel
Thanks to multiple readers for comments and patience as I sorted this out.  I now have working length and names methods for Surv objects, which do not seem to break anything.   I just ran the test suites for 471 packages that depend on survival, but I don't test against bioconductor so cannot

Re: [Rd] new behavior in model.response

2018-06-27 Thread Therneau, Terry M., Ph.D. via R-devel
I now understand the issue, which leads to a different and deeper issue which is "how to assign a proper length to Surv objects". > Surv(c(1,2,3), c(1,0,1)) [1] 1  2+ 3 The above prints as 3 elements and is conceptually 3 elements. But if I give it length method to return a 3 then I need a n

Re: [Rd] new behavior of model.response

2018-06-27 Thread Therneau, Terry M., Ph.D. via R-devel
Charles Berry pointed out an error in my reasoning.   In the current survival I forgot the S3method line for length in the NAMESPACE file, so the behavior is really not new.  Nonetheless it remains surprising and non-intuitive.  Why does model.response sometimes attach spurious names, when th

[Rd] new behavior of model.response

2018-06-27 Thread Therneau, Terry M., Ph.D. via R-devel
object above is 8, BTW; the fact that it's representation requires either 16 elements (right censored) or 24 (interval censored) is a footnote. Terry Therneau [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [EXTERNAL] Re: list of methods

2018-06-26 Thread Therneau, Terry M., Ph.D. via R-devel
rence. But Surv > gets a lot less for free since length() returns twice their logical > length, an unfortunate inconsistency. > > Michael > > > > On Tue, Jun 26, 2018 at 11:24 AM, Therneau, Terry M., Ph.D. via > R-devel wrote: >> I recently got a request to add head

[Rd] list of methods

2018-06-26 Thread Therneau, Terry M., Ph.D. via R-devel
I recently got a request to add head() and tail() methods for Surv objects, which is quite reasonable, but not unlike other requests for logLik,  vcov, extractAIC, ...   What they all have in common is that are methods added since creation of the survival package, and that I didn't know they

Re: [Rd] issue with model.frame()

2018-05-01 Thread Therneau, Terry M., Ph.D. via R-devel
I want to add that the priority for this is rather low, since we have a couple of work arounds for the user/data set in question. I have some ideas about changing the way in which ridge() works, which might make the problem moot. The important short-term result was finding that it wasn't an er

Re: [Rd] [EXTERNAL] Re: issue with model.frame()

2018-05-01 Thread Therneau, Terry M., Ph.D. via R-devel
is to use multiple ridge() calls to break it up; since he/she was using a fixed tuning parameter the result is the same. Terry T. On 05/01/2018 11:43 AM, Berry, Charles wrote: On May 1, 2018, at 6:11 AM, Therneau, Terry M., Ph.D. via R-devel wrote: A user sent me an example where coxph

[Rd] issue with model.frame()

2018-05-01 Thread Therneau, Terry M., Ph.D. via R-devel
A user sent me an example where coxph fails, and the root of the failure is a case where names(mf) is not equal to the term.labels attribute of the formula -- the latter has an extraneous newline. Here is an example that does not use the survival library. # first create a data set with many lon

[Rd] strange warning: data() error?

2018-04-16 Thread Therneau, Terry M., Ph.D. via R-devel
A user asked me about this and I can't figure it out. tmt% R R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered Consequences" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) > library(survival) > data(cgd0) Warning message: In d

[Rd] survival updates and testing

2018-04-06 Thread Therneau, Terry M., Ph.D. via R-devel
I've run the latest version of survival through the test suites of 486 of the 565 packages that depend on it (Depends, Imports, LinkingTo, Suggests), and have a couple small issues that I'm taking to other authors about. The exercise turned up a half dozen real errors in my package.  I plan to su

Re: [Rd] [EXTERNAL] Re: Fwd: Re: Re: backquotes and term.labels

2018-03-08 Thread Therneau, Terry M., Ph.D. via R-devel
Ben, I looked at the source code you pointed out, and the line fr <- fr[attr(terms(fr),"varnames.fixed")] sure looks to me as though the terms() function has returned an object with a varnames.fixed attribute. Either that or your code has inside knowledge that a reader like me won't know.

[Rd] Fwd: Re: [EXTERNAL] Re: backquotes and term.labels

2018-03-08 Thread Therneau, Terry M., Ph.D. via R-devel
the model frame (without backticks) as an attribute for later retrieval: https://github.com/lme4/lme4/commit/56416fc8b3b5153df7df5547082835c5d5725e89. On Wed, Mar 7, 2018 at 8:22 AM, Therneau, Terry M., Ph.D. via R-devel wrote: Thanks to Bill Dunlap for the clarification. On follow-up it turns out th

Re: [Rd] backquotes and term.labels

2018-03-07 Thread Therneau, Terry M., Ph.D. via R-devel
d`)" "`x y z`" >   ll <- attr(Terms, "term.labels") > gsub("^`|`$", "", ll) [1] "log(`b$a$d`)" "x y z" It is a bit of a mess. Bill Dunlap TIBCO Software wdunlap tibco.com <http://tibco.com> On Mon, Mar 5, 2018 at

[Rd] backquotes and term.labels

2018-03-05 Thread Therneau, Terry M., Ph.D. via R-devel
A user reported a problem with the survdiff function and the use of variables that contain a space.  Here is a simple example.  The same issue occurs in survfit for the same reason. lung2 <- lung names(lung2)[1] <- "in st"   # old name is inst survdiff(Surv(time, status) ~ `in st`, data=lung2) E

[Rd] Fwd: Re: Best practices in developing package:

2018-02-01 Thread Therneau, Terry M., Ph.D.
I'm not going to force anyone to use roxygen2. But I personally find it easier to have the function right below the documentation, so that any change to the function can immediately be documented as well. You prefer to do this by keeping that strictly separated, which is absolutely fine. It's just

[Rd] resolving a names conflict

2018-01-09 Thread Therneau, Terry M., Ph.D.
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

Re: [Rd] winbuilder warning message wrt function pointers

2017-12-29 Thread Therneau, Terry M., Ph.D.
com> > > On Fri, Dec 29, 2017 at 8:48 AM, William Dunlap <mailto:wdun...@tibco.com>> wrote: > > Try changing >   static void (*fun)() = NULL; > to >   DL_FUNC fun = NULL; > > Bill Dunlap > TIBCO Software > wdunlap tibco.com <http

Re: [Rd] data compression in a package

2017-12-29 Thread Therneau, Terry M., Ph.D.
On 12/29/2017 07:34 AM, Dirk Eddelbuettel wrote: On 29 December 2017 at 07:23, Therneau, Terry M., Ph.D. wrote: | The submission guide has the following cryptic (to me) sentence: |    "Reasonable compression should be used for data (not just .rda files) " | | The survival pac

[Rd] data compression in a package

2017-12-29 Thread Therneau, Terry M., Ph.D.
The submission guide has the following cryptic (to me) sentence:    "Reasonable compression should be used for data (not just .rda files) " The survival pacakge has a fairly large number of data files --- exactly what should I be doing?   xz compression? Terry T. _

[Rd] winbuilder warning message wrt function pointers

2017-12-29 Thread Therneau, Terry M., Ph.D.
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,    i

[Rd] R_RegisterCCallable

2017-12-20 Thread Therneau, Terry M., Ph.D.
e has     fun= (int(*)) R_GetCCallable("bdsmatrix", "cholesky4"); Should these also change to use the pseudo name, or is it fine as is? Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] y label for X11 graphics (solved)

2017-09-27 Thread Therneau, Terry M., Ph.D.
Family matters have kept me away, I'm finally coming back to this thread. In summary, this is an issue with a particular workstation, not with R. Graphics with X11(type="Xlib") have a y label problem when displayed on this particular box, whether using R locally or from a server via ssh -X. T

Re: [Rd] vcov and survival

2017-09-14 Thread Therneau, Terry M., Ph.D.
On 09/14/2017 08:46 AM, Fox, John wrote: Dear Martin, I made three points which likely got lost because of the way I presented them: (1) Singularity is an unusual situation and should be made more prominent. It typically reflects a problem with the data or the specification of the model. Th

Re: [Rd] vcov and survival

2017-09-14 Thread Therneau, Terry M., Ph.D.
here https://svn.r-project.org/R/trunk/src/library/stats/R/glm.R and https://svn.r-project.org/R/trunk/src/library/stats/man/glm.Rd > I do quite agree that vcov() should be compatible with > coef() [and summary()] for both 'lm' and 'glm' methods, i.e.,

[Rd] vcov and survival

2017-09-13 Thread Therneau, Terry M., Ph.D.
quot;, i.e., made to agree? I suspect that doing so will break other packages, but then NA coefs are rather rare so perhaps not. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] y label for X11 graphics

2017-09-13 Thread Therneau, Terry M., Ph.D.
In the following plot, the y label is missing if it is too long. x11(type="Xlib") plot(1:5, 1:5, ylab="Do, a deer, a female deer") # missing label plot(1:5, 1:5, ylab="Do") # label is present All is well for x11(type="cairo") This is true both under R devel 2017-09-01

Re: [Rd] Missing y label

2017-09-01 Thread Therneau, Terry M., Ph.D.
I did read that fine file. I added the following line to my /etc/apt/sources.list file: tmt-local2023% tail -2 /etc/apt/sources.list # R sources deb https://mirror.las.iastate.edu/bin/linux/ubuntu xenial/ Here is what apt says on my machine tmt-local2024% apt-cache policy r-base-core r-base-core

  1   2   3   4   >