Re: [Rd] R CMD check issue with R 3.0.2

2013-10-28 Thread Terry Therneau
On 10/28/2013 06:00 AM, r-devel-requ...@r-project.org wrote: On 13-10-26 9:49 PM, Simon Urbanek wrote: On Oct 25, 2013, at 12:12 PM, Yihui Xie wrote: This has been asked s many times that I think it may be a good idea for R CMD check to just stop when the user passes a directory

Re: [Rd] Multiple return values / bug in rpart?

2013-08-13 Thread Terry Therneau
in Splus, I think even before R rose to prominence. I vaguely remember a time when it's usage generated a warning. The fact that I've never noticed this unused routine is somewhat embarrassing. Perhaps I need a not documented, never called addition to R CMD check to help me along. Terry

[Rd] Problem with anova and the new abbreviation restrictions

2013-07-01 Thread Terry Therneau
An unwanted side effect of the new restrictions on abrreviated names. The anova.coxph command, in a slavish copy of anova.lm etc, returns a data frame with column labels of loglik Chisq Df Pr(|Chi|) If one tries to extract the final column of the table errors result since it is not a

Re: [Rd] Calling an array in a struct in C to R

2013-06-20 Thread Terry Therneau
Another solution is the one used for a long time in the rpart code. The R code called rpart1, which does the work, keeps a static pointer to the object, does NOT release it's memory, and returned the size of the object. Then the R code allocates appropriate vectors and called rpart2, which

Re: [Rd] loading of unwanted namespace

2013-05-03 Thread Terry Therneau
Martin, Your suggestion below did the trick. The issue was obvious once this pointed me to the correct bit of code. Thanks much. Terry T. begin included text --- trace(loadNamespace, quote(if (package == survival) recover())) will break into ?recover when survival is being loaded.

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-02 Thread Terry Therneau
I'll be the anybody to argue that } else { is an ugly kludge which you will never find in my source code. Yes, it's necessary at the command line because the parser needs help in guessing when an expression is finished, but is only needed in that case. Since I can hardly imagine using

[Rd] loading of an unwanted namespace

2013-05-02 Thread Terry Therneau
I have a debugging environment for the survival package, perhaps unique to me, but I find it works very well. To wit, a separate directory with copies of the source code but none of the package accuements of DESCRIPTION, NAMESPACE, etc. This separate space does NOT contain a copy of src/init.c

[Rd] Loss of identified points

2013-04-29 Thread Terry Therneau
Minimizing and then restoring a window that contains identified points leads to an error on my linux box. sessionInfo() R version 3.0.0 (2013-04-03) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=C [5]

[Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Terry Therneau
Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use xyz2 for the name of the R object and xyz for the pointer to its contents.) PROTECT(means2 = allocVector(REALSXP, nvar)); means =

Re: [Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Terry Therneau
On 04/01/2013 12:44 PM, Simon Urbanek wrote: On Apr 1, 2013, at 1:10 PM, Terry Therneau wrote: Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use xyz2 for the name of the R object and xyz

[Rd] ess completion

2013-03-22 Thread Terry Therneau
The thread is strange to me as well, since completion is logically impossible for my Sweave files. - an emacs buffer is open working on an .Rnw file - there is no copy of R running anywhere on the machine - the code chunk in the .Rnw file refers to a R data object saved somewhere

Re: [Rd] R-devel Digest, Vol 121, Issue 20

2013-03-21 Thread Terry Therneau
and on not getting in your way. Preface to The C Book, M Banahan et al Terry Therneau On 03/21/2013 06:00 AM, r-devel-requ...@r-project.org wrote: Allowing partial matching on $-extraction has always been a source of accidents. Recently, someone who shall remain nameless tried names(mydata) - d^2

[Rd] Re Deprecating partial matching in $.data.frame

2013-03-21 Thread Terry Therneau
As a follow-up to my previous, let me make a concrete suggestion: Add this as one of the options df-partial-match = allowed, warn, fail Set the default to warn for the current R-dev, and migrate it to fail at a later date of your choosing. I expect that this is very little more work

Re: [Rd] Depreciating partial matching

2013-03-21 Thread Terry Therneau
Note: My apolgies for the Subject in the original post On 03/21/2013 08:59 AM, Milan Bouchet-Valat wrote: Le jeudi 21 mars 2013 à 08:51 -0500, Terry Therneau a écrit : I am not in favor of the change, which is a choice of rigor over usability. When I am developing code or functions I agree

Re: [Rd] Depreciating partial matching

2013-03-21 Thread Terry Therneau
On 03/21/2013 10:00 AM, Simon Urbanek wrote: I would think that the ability to hit the Tab key to trigger name completion in your R GUI makes partial matching almost useless. The avantage of interactive completion in the GUI is that you immediately see the result of the partial matching.

Re: [Rd] numerics from a factor

2013-03-19 Thread Terry Therneau
Thanks Martin. I had already changed the second argument to getOption. By the way, per an off list comment from Brian R the bug I was addressing won't affect anyone using R as shipped; the default decimal separator is . whatever the region. It only bit those who set the OutDec option

[Rd] numerics from a factor

2013-03-15 Thread Terry Therneau
component time of the result is created using as.numeric(levels(ftime)). It's this last line that breaks. I could set the OutDec option within survfit and reset when I leave using on.exit. Any other simple solutions? Any other ways I could get caught by this issue? Terry Therneau

Re: [Rd] R-devel Digest, Vol 121, Issue 13

2013-03-13 Thread Terry Therneau
I think it would be a good idea. Several versions of the survival package had a duplicate line in the S3methods, and were missing a line that should have been there, due to a cut/paste error. Terry T. On 03/13/2013 06:00 AM, r-devel-requ...@r-project.org wrote: Circa 80 CRAN and core-R

Re: [Rd] Registering native routines

2013-02-25 Thread Terry Therneau
That was the correct direction: I changed the earler line to routines - list(Ccoxfit5a, ... and the the later to .C(routnines[[1]]) and now it works as desired. Terry T. On 02/23/2013 03:09 AM, Duncan Murdoch wrote: On 13-02-22 2:59 PM, Terry Therneau wrote: I'm working on registering all

[Rd] Registering native routines

2013-02-22 Thread Terry Therneau
I'm working on registering all the routines in the survival package, per a request from R-core. Two questions: 1. In the coxph routine I have this type of structure: if (survival has 2 columns) routines - c(coxfit5_a, coxfit5_b, coxfit5_c) else routines -

[Rd] Small suggestion for termplot

2013-02-18 Thread Terry Therneau
Brian, I used termplot(..., plot=FALSE) recently in R-devel: works like a charm. Thanks much for the update. Our in-house gamterms function, which this obviates, would also return the constant attribute from the underlying predict(..., type=terms) call. I have occasionally found this

Re: [Rd] stringsAsFactors

2013-02-11 Thread Terry Therneau
be overridden I'm okay. Yes, I'd prefer FALSE as the default, partly because the current value is a tripwire in the hallway that eventually catches every new user. Terry Therneau On 02/11/2013 05:00 AM, r-devel-requ...@r-project.org wrote: Both of these were discussed by R Core. I think it's

Re: [Rd] stringsAsFactors

2013-02-11 Thread Terry Therneau
to a factor, but I think that is unavoidable without really big changes. Duncan Murdoch Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Terry Therneau Sent: Monday

Re: [Rd] stringsAsFactors

2013-02-11 Thread Terry Therneau
Peter, I had an earlier response to Duncan that I should have copied to the list. The subset issue can be fixed. When the model changes character to factor, it needs to remember the levels; just like it does with the factors. We are simply seeing a reprise of problems that occured whem

Re: [Rd] regression stars

2013-02-08 Thread Terry Therneau
been overriding both of these for 10+ years. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Why can't I unclass an array?

2012-12-21 Thread Terry Therneau
In a real example I was trying to remove the class from the result of table, just because it was to be used as a building block for other things and a simple integer vector seemed likely to be most efficient. I'm puzzled as to why unclass doesn't work. zed - table(1:5) class(zed) [1] table

[Rd] CMD check and .Rbuildignore

2012-12-10 Thread Terry Therneau
I often run R CMD check on my package source. I've noted of late that this process gives warning messages about files listed in my .Rbuildignore file, where is once ignored these. Terry T. __ R-devel@r-project.org mailing list

[Rd] as.matrix.Surv -- R core question/opinions

2012-12-06 Thread Terry Therneau
1. A Surv object is a matrix with some extra attributes. The as.matrix.Surv function removes the extras but otherwise leaves it as is. 2. The last several versions of the survival library were accidentally missing the S3method('as.matrix', 'Surv') line from their NAMESPACE file. (Instead

[Rd] Baffled with as.matrix

2012-11-30 Thread Terry Therneau
release (2.37), it has lost this special behavior. One package that depends on survival expects this behavior and thus fails. I'm at a loss to figure out how my package got this attribute in the first place, or how it lost it. Can anyone shed light? Terry Therneau PS I'm on vacation for the next

[Rd] Puzzling behavior while testing

2012-11-27 Thread Terry Therneau
, and no evidence of any of testpkg, survdep, or anything else I'd defined. My prompt has been changed to R as well. Any idea what is happening? Terry Therneau Here is the text just before starting the loop sessionInfo() R version 2.15.2 (2012-10-26) Platform: i686-pc-linux-gnu (32-bit

[Rd] Addition of plot=F argument to termplot

2012-10-19 Thread Terry Therneau
I have a suggested addition to termplot. We have a local mod that is used whenever none of the termplot options is quite right. It is used here almost daily for Cox models in order to put the y axis on a risk scale: fit - coxph(Surv(time, status) ~ ph.ecog + pspline(age), data=lung) zz -

Re: [Rd] Fastest non-overlapping binning mean function out there?

2012-10-03 Thread Terry Therneau
Look at rowsum. It's pretty fast C code. Terry T On 10/03/2012 05:00 AM, r-devel-requ...@r-project.org wrote: Hi, I'm looking for a super-duper fast mean/sum binning implementation available in R, and before implementing z = binnedMeans(x y) in native code myself, does any one know of an

[Rd] Rbuildignore question

2012-09-20 Thread Terry Therneau
I'm touching up changes to rpart and have a question with .Rbuildignore. Here is my file tmt1014% more .Rbuildignore test.local \.hg src/print_tree.c The source code included a module print_tree.c, used for dubugging. Commented out calls to can be found here and there. I want to leave it

Re: [Rd] Rbuildignore question

2012-09-20 Thread Terry Therneau
. I'll check the tarball soon, but I'm guessing you are right about the error going away. On 09/20/2012 12:57 PM, Duncan Murdoch wrote: On 20/09/2012 1:43 PM, Terry Therneau wrote: I'm touching up changes to rpart and have a question with .Rbuildignore. Here is my file tmt1014% more .Rbuildignore

Re: [Rd] R-devel Digest, Vol 115, Issue 18

2012-09-19 Thread Terry Therneau
being forced on us, I can do such micshief as easily as under number 1. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R-devel Digest, Vol 115, Issue 18

2012-09-19 Thread Terry Therneau
On 09/19/2012 09:22 AM, Duncan Murdoch wrote: I understand the issue with time constraints on checks, and I think there are discussions in progress about that. My suggestion has been to put in place a way for a tester to say that checks need to be run within a tight time limit, and CRAN as

[Rd] Cran package checks

2012-09-05 Thread Terry Therneau
Some questions motivated by this discussion. From the CRAN policy page: Checking the package should take as little CPU time as possible, as the CRAN check farm is a very limited resource and there are thousands of packages. Long-running tests and vignette code can be made optional for

Re: [Rd] if(--as-cran)?

2012-09-04 Thread Terry Therneau
On 09/04/2012 05:00 AM, r-devel-requ...@r-project.org wrote: The issue is not just about CRAN vs off CRAN. It is good to think about a more general scheme of light testing vs normal testing vs extensive testing, e.g., for the situation where the package implements (simulation/bootstrap/ ..)

Re: [Rd] if(--as-cran)?

2012-09-04 Thread Terry Therneau
On 09/04/2012 01:57 PM, Duncan Murdoch wrote: On 04/09/2012 2:36 PM, Warnes, Gregory wrote: On 9/4/12 8:38 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 04/09/2012 8:20 AM, Terry Therneau wrote: On 09/04/2012 05:00 AM, r-devel-requ...@r-project.org wrote: The issue is not just

Re: [Rd] Rd] Numerics behind splineDesign

2012-08-02 Thread Terry Therneau
an expectation). Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Rd] Numerics behind splineDesign

2012-08-02 Thread Terry Therneau
-project.org] On Behalf Of Terry Therneau Sent: Thursday, August 02, 2012 6:10 AM To: r-devel@r-project.org; Nathaniel Smith Subject: Re: [Rd] Rd] Numerics behind splineDesign On 08/02/2012 05:00 AM, r-devel-requ...@r-project.org wrote: Now I just have to grovel over the R code in ns() and bs

Re: [Rd] Fast Kendall's tau

2012-06-27 Thread Terry Therneau
Note that the survConcordance function, which is equivalent to Kendall's tau, also is O(n log n) and it does compute a variance. The variance is about 4/5 of the work. Using R 2.15.0 on an older Linux box: require(survival) require(pcaPP) tfun - function(n) { + x - 1:n + runif(n)*n

[Rd] model.frame and predvars

2012-06-05 Thread Terry Therneau
I was looking at how the model.frame method for lm works and comparing it to my own for coxph. The big difference is that I try to retain xlevels and predvars information for a new model frame, and lm does not. I use a call to model.frame in predict.coxph, which is why I went that route, but

Re: [Rd] model.frame and predvars

2012-06-05 Thread Terry Therneau
On 06/05/2012 11:32 AM, Prof Brian Ripley wrote: On 05/06/2012 16:17, Terry Therneau wrote: I was looking at how the model.frame method for lm works and comparing it to my own for coxph. The big difference is that I try to retain xlevels and predvars information for a new model frame, and lm

Re: [Rd] Evaluation without the parent frame

2012-05-17 Thread Terry Therneau
into it further. My first foray failed because what I want (I think) is the environment that they had when the first came up. I tried baseenv in a spot, but then my code couldn't find the model.frame function. Terry T. On 05/17/2012 05:00 AM, Duncan wrote: On 12-05-16 4:59 PM, Terry Therneau

[Rd] Evaluation without using the parent frame

2012-05-16 Thread Terry Therneau
I've been tracking down a survival problem from R-help today. A short version of the primary issue is reconstructed by the following simple example: library(survival) attach(lung) fit - coxph(Surv(time, status) ~ log(age)) predict(fit, newdata=data.frame(abe=45)) Note the typo in the last

Re: [Rd] Vignette problem

2012-05-15 Thread Terry Therneau
. Now it works! And I have no idea what could have prompted the change. It will remain a mystery, since I'm not going to try to bring the error back. :-) Terry T. On 05/14/2012 01:19 PM, Duncan Murdoch wrote: On 14/05/2012 1:28 PM, Terry Therneau wrote: I'm having a problem rebuilding

[Rd] Vignette problem

2012-05-14 Thread Terry Therneau
I'm having a problem rebuilding a package, new to me in R 2.15.0 (Linux) It hits all that contain the line \usepackage[pdftex]{graphics} and leads to the following when running R CMD check on the directory. (I do this often; a final run on the tar.gz file will happen before submission.)

Re: [Rd] Method=df for coxph in survival package

2012-04-18 Thread Terry Therneau
In that particular example the value of 4 was pulled out of the air. There is no particular justification. There is a strong relationship between the effective degrees of freedom and the variance of the random effect, and I often find the df scale easier to interpret. See the Hodges and

Re: [Rd] Vignette questions

2012-04-12 Thread Terry Therneau
On 04/12/2012 02:15 AM, Uwe Ligges wrote: On 12.04.2012 01:16, Paul Gilbert wrote: On 12-04-11 04:41 PM, Terry Therneau wrote: Context: R2.15-0 on Ubuntu. 1. I get a WARNING from CMD check for Package vignette(s) without corresponding PDF: In this case the vignettes directory had both

[Rd] Vignette questions

2012-04-11 Thread Terry Therneau
. 3. Do these unprocessed package also contribute to the index via \VignetteIndexEntry lines, or will I need to create a custom index? Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] CRAN policies

2012-03-29 Thread Terry Therneau
misspelled variable names, and the message is a very welcome check. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Vignettes and CRAN checks

2012-03-29 Thread Terry Therneau
I'l like to chime in on the subject of vignette checks. I have one vignette in the coxme library that would be better described as a white paper. It discusses the adequacy of the Laplace transform under various scenarios. It contains some substantial computations, so I'd like to mark it as

Re: [Rd] Problem with table

2012-03-27 Thread Terry Therneau
On 03/27/2012 02:05 AM, Prof Brian Ripley wrote: n 19/03/2012 17:01, Terry Therneau wrote: R version 2.14.0, started with --vanilla table(c(1,2,3,4,NA), exclude=2, useNA='ifany') 1 3 4 NA 1 1 1 2 This came from a local user who wanted to remove one particular response from some tables

[Rd] PROTECT help

2012-03-27 Thread Terry Therneau
I received the following note this AM. The problem is, I'm not quite sure how to fix it. Can one use PROTECT(coxlist(eval(PROTECT , do I create an intermediate variable, or otherwise? I'm willing to update the code if someone will give me a pointer to the right documentation. This

Re: [Rd] PROTECT help

2012-03-27 Thread Terry Therneau
Brian Duncan: Thanks. This was exactly what I needed to know. Terry On 03/27/2012 08:41 AM, Prof Brian Ripley wrote: On 27/03/2012 14:22, Terry Therneau wrote: I received the following note this AM. The problem is, I'm not quite sure how to fix it. Can one use PROTECT(coxlist(eval

Re: [Rd] R-devel Digest, Vol 109, Issue 22

2012-03-22 Thread Terry Therneau
strongly disagree. I'm appalled to see that sentence here. Come on! The overhead is significant for any large vector and it is in particular unnecessary since in .C you have to allocate*and copy* space even for results (twice!). Also it is very error-prone, because you

Re: [Rd] R-devel Digest, Vol 109, Issue 22

2012-03-22 Thread Terry Therneau
On 03/22/2012 09:38 AM, Simon Urbanek wrote: On Mar 22, 2012, at 9:45 AM, Terry Therneau thern...@mayo.edu mailto:thern...@mayo.edu wrote: strongly disagree. I'm appalled to see that sentence here. Come on! The overhead is significant for any large vector

Re: [Rd] .Call ref card

2012-03-22 Thread Terry Therneau
On 03/22/2012 11:03 AM, peter dalgaard wrote: Don't know how useful it is any more, but back in the days, I gave this talk in Vienna http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Dalgaard.pdf Looking at it now, perhaps it moves a little too quickly into the hairy stuff. On the

[Rd] .C clarification

2012-03-03 Thread Terry Therneau
Does .C duplicate unnecessary arguments? For instance fit - .C(xxx, as.integer(n), x, y, z=double(15)) The first and fourth arguments would have NAMED = 0. Is my guess that .C won't make yet one more (unnecessary) copy correct? (Just trying to understand). Terry T

Re: [Rd] Sweave driver extension

2012-01-31 Thread Terry Therneau
Three thinngs - My original questions to R-help was who do I talk to. That was answered by Brian R, and the discussion of how to change Sweave moved offline. FYI, I have a recode in hand that allows arbitrary reordering of chunks; but changes to code used by hundreds need to be approached

[Rd] Sweave driver extension

2012-01-24 Thread Terry Therneau
of the call tree next to the section parsing a formula, etc. This is stuff that doesn't fit in comment lines. The text/code ratio is 1. On the other hand I've thought very little about integration of manual pages and description files with the code, issues which Roxygen addresses. Terry Therneau

[Rd] Rd error message

2011-12-16 Thread Terry Therneau
that will be glaringly obvious once it's pointed out, but without a line number I can't seem to find it. I've been counting braces but don't see a mismatch. FYI, the file is below. (It is modeled on chol.Rd from the Matrix package.) Terry Therneau -- \name{backsolve

Re: [Rd] last message -- I've answered my own question

2011-12-16 Thread Terry Therneau
Yes, it was glaring and obvious: I had the label description a second time when I really meant details. Still, I had to delete sections of the file 1 by 1 until it slapped me in the face. Sorry for any bother. Terry T. __ R-devel@r-project.org

[Rd] class extension and documentation

2011-12-05 Thread Terry Therneau
for backsolve and backsolve.default. I don't think I should rewrite those. How do I sidestep this and/or what other manuals should I read? Perhaps do setMethod(backsolve, signature(r=ALL), base:::backsolve(r, ...)) instead? Terry Therneau

[Rd] PS to prior note

2011-12-05 Thread Terry Therneau
Sorry to forget this sessionInfo() R version 2.14.0 (2011-10-31) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=C [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8

Re: [Rd] class extension and documentation

2011-12-05 Thread Terry Therneau
Duncan's reply to my query Now R CMD check claims that I need Rd pages for backsolve and backsolve.default. I don't think I should rewrite those. How do I sidestep this and/or what other manuals should I read? Even though your change is subtle, I'd say it's still a change

Re: [Rd] 32 vs 64 bit difference?

2011-11-28 Thread Terry Therneau
Thank you both for the nice explanation. I added digits=4 to my print statements to shorten the display. Mixed effects Cox models can have difficult numerical issues, as it turns out; I've added this to my collection of things to watch for. Terry Therneau On Sat, 2011-11-26 at 11:37 +

Re: [Rd] How to deal with package conflicts

2011-11-25 Thread Terry Therneau
on a coxph context. It would also solve a frailty() problem of long standing, that when used in survreg only a subset of the frailty options make sense; this is documented in the help file but catches users again and again. Terry Therneau On Fri, 2011-11-25 at 12:00 +0100, r-devel-requ...@r

Re: [Rd] How to deal with package conflicts

2011-11-25 Thread Terry Therneau
work, sometimes leaves my head spinning. Terry T. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] How to deal with package conflicts

2011-11-25 Thread Terry Therneau
On Fri, 2011-11-25 at 10:42 -0500, Michael Friendly wrote: Duncan provided one suggestion: make ridge() an S3 generic, and rename ridge() to ridge.coxph(), but this won't work, since you use ridge() inside coxph() and survreg() to add a penalty term in the model formula. Another idea might

Re: [Rd] How to deal with package conflicts

2011-11-25 Thread Terry Therneau
I like the idea of making the functions local, and will persue it. This issue has bothered me for a long time -- I had real misgivings when I introduced cluster to the package, but did not at that time see any way other than making it global. I might make this change soon in the ridge

[Rd] 32 vs 64 bit difference?

2011-11-25 Thread Terry Therneau
bit Ubuntu. Could this be enough to cause the difference? Most of my tests are based on all.equal, but I also print out 1 or 2 full solutions; perhaps I'll have to modify that? Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch

Re: [Rd] R-devel Digest, Vol 105, Issue 22

2011-11-22 Thread Terry Therneau
over. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Small nit in Sweave

2011-11-15 Thread Terry Therneau
Two small Sweave issues. 1. I had the following line in my code echo=FALSE, results=hide resulting in the message Error in match.arg(options$results, c(verbatim, tex, hide)) : 'arg' should be one of “verbatim”, “tex”, “hide” I puzzled on this a bit since my argument exactly matched the

[Rd] multiple defines of diag

2011-10-06 Thread Terry Therneau
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

Re: [Rd] multiple defines of diag

2011-10-06 Thread Terry Therneau
On Thu, 2011-10-06 at 10:00 -0400, Kasper Daniel Hansen wrote: if you're using two packages that both define a diag function/method you absolutely _have_ to resolve this using your NAMESPACE. [Update: I see both are methods. I actually don't know what happens when you have the same generic

Re: [Rd] number of copies - summary

2011-10-04 Thread Terry Therneau
it. Thanks again for the useful comments. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] number of copies

2011-10-03 Thread Terry Therneau
I'm looking at memory efficiency for some of the survival code. The following fragment appears in coxph.fit coxfit - .C(coxfit2, iter=as.integer(maxiter), as.integer(n), as.integer(nvar), stime, sstat, x= x[sorted,]

Re: [Rd] number of copies

2011-10-03 Thread Terry Therneau
On Mon, 2011-10-03 at 12:31 -0400, Simon Urbanek wrote: Thanks. I was hoping that x[,sorted] would act like double(n) does in a .C call, and have no extra copies made since it has no local assignment. Yes it does act the same way, you get an extra copy with double(n) as well - there is

Re: [Rd] Confusing inheritance problem

2011-07-18 Thread Terry Therneau
and obvious. Thanks in advance for any pointers. Terry T. On Sat, 2011-07-16 at 19:27 +0200, Uwe Ligges wrote: On 15.07.2011 23:23, Terry Therneau wrote: I have library in development with a function that works when called from the top level, but fails under R CMD check. The paricular

[Rd] Confusing inheritance problem

2011-07-15 Thread Terry Therneau
dimensions Adding a print statement above the rowSums call shows that the argument is a 14 by 14 dsCMatrix. I'm happy to send the library to anyone else to try and duplicate. Terry Therneau tmt% R --vanilla sessionInfo() R version 2.13.0 (2011-04-13) Platform: x86_64-unknown-linux-gnu (64-bit

[Rd] R 2.13 segfault with range()

2011-05-02 Thread Terry Therneau
- The data set is too large to attach, but I can send the test.rda file off list. The data is not confidential. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] standard format for newdata objects

2011-04-27 Thread Terry Therneau
Harrell would argue that his sometimes misguided default in cph is better than the almost always wrong one in coxph though, and there is certainly some strength in that position. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch

[Rd] help with eval()

2011-04-18 Thread Terry Therneau
has stymied my efforts to fix the scoping problem in predict.coxph, unless I drop the env(formula) argument alltogether. But I assume there must be good reasons for it's inclusion and am reluctant to do so. Terry Therneau sessionInfo() R version 2.13.0 RC (2011-04-12 r55424) Platform: x86_64

Re: [Rd] predict()

2011-04-15 Thread Terry Therneau
On Fri, 2011-04-15 at 09:10 +0200, peter dalgaard wrote: I couldn't reproduce it from Terry's description either, but there _is_ an issue which parallels the I'll start with an apology: as a first guess to understand the problem with predict.coxph I tried something parallel to Ivo's

[Rd] Problem with dyn.load in R 2.13.0

2011-04-13 Thread Terry Therneau
or directory q() -- Is the issue that the .so file must have been created with the R2.13 script? That's not what the error message says, however. It almost looks like it is ignoring my first argument and looking instead for libR. Terry Therneau

Re: [Rd] Problem with dyn.load in R 2.13.0

2011-04-13 Thread Terry Therneau
On Wed, 2011-04-13 at 16:45 -0400, Simon Urbanek wrote: We have no details, but my wild guess would be that you did not re-build the package for 2.13.0 and you have static libR in 2.13.0 yet dynamic in 2.12.2. Cheers, Simon Per my prior note, my guess at the root of the issue is use of

[Rd] drop.unused.levels

2011-03-31 Thread Terry Therneau
, ... Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] rowsum

2011-03-29 Thread Terry Therneau
blessing), and ceased to label it as part of survival in the manual. This metabug can't be laid at R's feet. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] round, unique and factor

2011-03-21 Thread Terry Therneau
Survfit had a bug in some prior releases due to the use of both unique(times) and table(times); I fixed it by rounding to 15 digits per the manual page for as.character. Yes, I should ferret out all the usages instead, but this was fast and it cured the user's problem. The bug is back! A data

[Rd] coxph and drop1

2011-03-14 Thread Terry Therneau
of them reference a chi-square distribution. My thought is use these arguments, and add an error message read the help file for drop1.coxph when the defaults appear. Any better suggestions? Terry Therneau __ R-devel@r-project.org mailing list https

Re: [Rd] coxph and drop1

2011-03-14 Thread Terry Therneau
On Mon, 2011-03-14 at 12:52 -0400, John Fox wrote: Dear Terry, Possibly I'm missing something, but since the generic drop1() doesn't have a test argument, why is there a problem? args(drop1) function (object, scope, ...) If you use match.arg() against test, then the error message

[Rd] unique.matrix issue [Was: Anomaly with unique and match]

2011-03-10 Thread Terry Therneau
Simon pointed out that the issue I observed was due to internal behaviour of unique.matrix. I had looked carefully at the manual pages before posting the question and this was not mentioned. Perhaps an addition could be made? Terry T. __

[Rd] Anomaly with unique and match

2011-03-09 Thread Terry Therneau
I stumbled onto this working on an update to coxph. The last 6 lines below are the question, the rest create a test data set. tmt585% R R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) #

Re: [Rd] print(...,digits=2) behavior

2011-03-08 Thread Terry Therneau
This affects _many_ *.Rout.save checks in packages. I assume this is in the R-devel branch. I've got an addition to survival nearly ready to go (faster concordance calculation). At what point should I should I switch over to the newer version, fix up my .out files etc, to best mesh with the

[Rd] function local to a fit

2011-03-08 Thread Terry Therneau
in this way, where the meaning is local to the enclosing function. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Anomaly in [.terms

2011-02-21 Thread Terry Therneau
This arose when working on an addition to coxph, which has the features that the X matrix never has an intercept column, and we remove strata() terms before computing an X matrix. The surprise: when a terms object is subset the intercept attribute is turned back on. My lines 2 and 3 below were

[Rd] Rd2pdf error in R12.0

2011-02-17 Thread Terry Therneau
check on a package update. Any pointers? Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] news.Rd format

2011-01-22 Thread Terry Therneau
in version 2.36-3}{ \itemize{ etc and I get cannot extract version info from the following section titles for all of them. I must be missing something simple. Perhaps these two points could be clarified further in the manual page. Terry Therneau

  1   2   >