[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 t

[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

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 work

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 pac

[Rd] numerics from a factor

2013-03-15 Thread Terry Therneau
nique time points. At the very end the numeric 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

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 themse

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

2013-03-21 Thread Terry Therneau
trates on providing you with power 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.

[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 fo

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 functio

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 matc

[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 els

[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

[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] LC_MON

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

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] RFC: a "safe" uniroot() function for future R

2013-05-30 Thread Terry Therneau
Martin, 1. I'd vote for replacement. 2. The "Sig" argument was completely opaque to me. I'd vote for something like this bracket = "fixed" the old behavior, treat the upper and lower as fixed values = "search" expand the limits if needed = "usearch" only the

[Rd] binding message from R CMD check

2009-06-18 Thread Terry Therneau
When I run R CMD check on the survival package I get one error message that I have not been able to figure out: survfitCI: no visible binding for global variable 'n.nevent' I've examined the code and can't see the problem -- the variable in question appears several times. Is there as way t

[Rd] noweb and R

2009-07-27 Thread Terry Therneau
I'm working on the next release of coxme (ready to start some testing), and have written major chunks of it using noweb -- very similar to Sweave except I'm generating code and documentation for the code rather than vingetes. The question: I have directory with .Rnw objects and a Makefile th

[Rd] inheriting C symbols

2009-08-05 Thread Terry Therneau
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('s

Re: [Rd] inheriting C symbols

2009-08-05 Thread Terry Therneau
://www.nabble.com/Dynamic-linking-to-binary-code-from-other-packages---td20167535.html#a20474561 > > Take a look at 'xts' on cran, or R-forge. Specifically: > > http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/pkg/inst/api_example/README?rev=386&root=xts&view=m

[Rd] CMD check error (bug?)

2009-08-13 Thread Terry Therneau
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

Re: [Rd] CMD check error (bug?)

2009-08-13 Thread Terry Therneau
> Looks like a spelling error somewhere. The name is bdsmatrix (see above). That is so very obvious -- but only after someone else pointed it out. The eye sometimes sees what it expects to see. Thanks for the quick response. Terry T. __ R-devel@r-pr

[Rd] CRAN and noweb

2009-08-24 Thread Terry Therneau
reate the .R files there, delete the config and cleanup scripts, and submit that? Any ideas are appreciated. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] error checks

2009-11-13 Thread Terry Therneau
I'm currently packaging up some of the kinship matrix routines more formally, these are used in coxme when dealing with family correlation structures. One of my test programs exercises error conditions, i.e., it purposely feeds particular types of invalid pedigree data in to see if the right erro

Re: [Rd] Inconsistency in as.data.frame.table for stringsAsFactors

2010-01-25 Thread Terry Therneau
Kudos to Peter for actually answering the question of why the inconsistency was there. It might be well to add a bit to the documentation. As to the larger discussion of global defaults let me offer two opinions: 1. They are the salvation of those of us who do not agree with certain global de

[Rd] Suppressing a warning from library()

2010-02-24 Thread Terry Therneau
I get a warning about "1 warning message" using R CMD check on the survival library. It comes from the code snippet: if (library(cmprsk, logical.return=TRUE)) { # further test of competing risks from survfit . . } This is a very useful additional test when I'm c

Re: [Rd] Suppressing a warning from library()

2010-02-24 Thread Terry Therneau
The suppressWarnings construct looks like a good idea; I was not aware of it's existence. Thanks for the feedback. Terry T. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Defining a method in two packages

2010-03-05 Thread Terry Therneau
is has a simple solution which I have missed. Terry Therneau tmt935% R --vanilla R version 2.10.0 (2009-10-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under cer

Re: [Rd] Defining a method in two packages

2010-03-08 Thread Terry Therneau
Brian & Uwe, Thanks for responding. Let me see if I can refine the query and move towards a solution. >From Uwe: > Of course, after loading lme4, you can still use the ranef from coxme: > coxme::ranef(fit) Of course, but I'm interested in other users (as well as myself) and prefer to avoid th

Re: [Rd] Defining a method in two packages

2010-03-10 Thread Terry Therneau
Doug wrote: > I think a simpler solution, which I have implemented in lme4 but not > yet released is to have > importFrom(nlme, ranef, fixef) > in the NAMESPACE file of packages that implement methods for those > generics (and, of course, add nlme to the Imports: specification in > the DESCRIPTIO

[Rd] Strange error

2010-04-06 Thread Terry Therneau
only) guess is memory corruption. Questions: Is this a rational guess? Any others? Can you give any further insight on the error message? Terry Therneau sessionInfo() R version 2.10.0 (2009-10-26) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C

[Rd] Deferred Default Marker

2010-04-23 Thread Terry Therneau
te replacement for kinship, at which point we will depreciate it. (Pedigrees and plotting were finished last weekend!) But I can't quite do that yet. The error does not arise with these newer libraries. There have been no changes to kinship for some time. Terry Therneau > sessionInfo()

Re: [Rd] Deferred Default Marker

2010-04-26 Thread Terry Therneau
Peter, There was no particular reason for an older kinship; just hadn't downloaded it in a while. I grabbed a private copy just now and the error went away, R 2.10.0. I remain curious as to what the message was about, but not enough for either of us to do any work to find out. I've sent off

Re: [Rd] SVN vs DVCS

2010-05-27 Thread Terry Therneau
e labeled with a tag, and then referred to by that name in the future. This problem and solution is discussed in a tutorial on Mecurial (http://hginit.com/, section on "repository architecture"), precisely for matching the archive state to a software release. I can't speak to any ot

[Rd] Date vs date

2007-09-14 Thread Terry Therneau
the format is certainly not ambiguous. (Not standard, but not ambiguous). Not important to fix, not something that date does any better. > as.Date('09Sep2007') Error in fromchar(x) : character string is not in a standard unambiguous format Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Date vs date (long)

2007-09-21 Thread Terry Therneau
idea. Not many (any?) people currently set na.action=na.fail because it is a "better design". -- Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++. The good languages have been those that were designed for their own creators: C, Perl, Smalltalk, Lisp. (Paul Graham) Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Evaluating R expressions from C

2008-01-04 Thread Terry Therneau
hes.) Is there another document that I should look at first? Why "isNewList"? I would have guessed "isList". What's the difference? Thanks for any help, Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Evaluating R expressions

2008-01-04 Thread Terry Therneau
All, Thank you for the prompt and useful answers to my questions. I had missed references in 5.7.6 which would have answered some of the points. As Bill pointed out a newer version of acrobat would help, but the Sun system here is still running 5.0. (An oversubscribed sysadmin). Then I

[Rd] literate programming

2008-08-05 Thread Terry Therneau
n begin to participate as well. (Retirement in 10 years -- I don't expect to maintain this forever!) Terry Therneau [EMAIL PROTECTED] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] literate programming

2008-08-06 Thread Terry Therneau
his means. Thanks much, Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] package development

2008-12-11 Thread Terry Therneau
iscussess a good setup for this middle ground between concieving of a library and packaging it for delivery; the "build, test, make sure it acually works" part of development. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] package development

2008-12-12 Thread Terry Therneau
Thanks to all for the replys. I've learned several things First -- I didn't miss anything obvious in the documentation. This is good in one sense at least: I wasn't being blind. I had one misunderstanding pointed out, which is that I need not worry about my test suite being run with each INS

[Rd] issue with [[<-Call

2008-12-25 Thread Terry Therneau
The following code works in Splus but not in R coxph <- function(formula, data, weights, subset, na.action, init, control, method= c("efron", "breslow", "exact"), singular.ok =TRUE, robust=FALSE, model=FALSE, x=FALSE, y=TRUE, ...) { method <- match.arg(method) Ca

[Rd] BATCH and testing

2008-12-25 Thread Terry Therneau
In a few of my test scripts for the survival code I expect warning messages (I actually try to trigger a couple). Using R BATCH infile outfile these messages don't end up in outfile, where I can compare them to what was expected. I don't see an option to change this. R < infile >& outfile wor

[Rd] Strange error message

2009-01-06 Thread Terry Therneau
pendix of my book, for which I know ALL the answers. There has been a change to the C code. Is this possibly due to a messed up calling chain? I've converted from "Chambers" style callback to Rinternals style (much cleaner and less mysterious), and the result works well in Splus. I thought I'd made it through the hard part Hints appreciated, after which I can give more details. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Strange error message

2009-01-06 Thread Terry Therneau
Brian, Thank you. This explains why it works in Splus: PROTECT is a null macro there, so I wouldn't have caught the miscount. Terry __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] irrelevant warning message

2009-01-12 Thread Terry Therneau
27;t bother him hint". If this addition followed on some discussion, please point me to it. The reaction of other experienced users in our group has been the same, when I pointed this out. So I am not alone in the "why?" Terry Therneau PS. Here are tw

Re: [Rd] irrelevant warning message

2009-01-13 Thread Terry Therneau
Thanks for the replies: Duncan: > and got a warning in all R versions I tried back to 2.4.1. In 2.3.1 > this was an error. It seems I have egg on my face wrt this point. A more true synopsis of what I saw should have been that 1. I've never noticed this in R before and 2. Until recently

[Rd] A model pass-through function

2009-01-18 Thread Terry Therneau
ct except a matrix. Any suggestions to work around this? Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] further notes on model.frame issue

2009-01-19 Thread Terry Therneau
d also looks out for dates. So the result is like ns() in the eyes of model.frame, and it works. But having to write gender twice on the rhs is confusing to users. Thanks in advance for any comments. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] CMD check puzzle

2009-02-09 Thread Terry Therneau
I am getting an error that I don't understand from R CMD check on my current instance of the survival code. R2.7.1 on Linux. Here is the last of the log * checking line endings in Makefiles ... OK * checking for portable use of $BLAS_LIBS ... OK * creating survival-Ex.R ... OK * checking exampl

[Rd] One more note

2009-02-09 Thread Terry Therneau
There are some warnings earlier in the log about my .Rd files (missing a description of weights and subset in a couple). The only message that I don't completely understand is * checking foreign function calls ... OK * checking R code for possible problems ... NOTE Error in firstlib(which.lib.lo

Re: [Rd] CMD check puzzle

2009-02-09 Thread Terry Therneau
> ... you need library(survival) in R code in tests/. It doesn't happen > automatically like it does for examples. Thanks Thomas, that is exactly the hint I needed. I had read the "check" part of the manual 3 times in vain; once you pointed it out I was able to fine the answer in the ma

[Rd] survival package

2009-02-10 Thread Terry Therneau
R core team - It took far, far longer than I anticipated, but I have finally finished the next release of the survival code. Primary changes 1. The source has been migrated to Rforge. This will now be the primary source. I've used SCCS -> rcs -> cvs and now svn. Further changes will be so

[Rd] methods package

2009-03-04 Thread Terry Therneau
? I'll be out of town for the next few days (son's wedding) so instant response is not necessary. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Two documentation questions

2009-03-04 Thread Terry Therneau
this? It makes reading the document to look for errors rather challenging. (That is, when I'm looking at a particular Rd file, and want to see what it turned out to be.) Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/m

Re: [Rd] documentation questions

2009-03-05 Thread Terry Therneau
You've answered my question 2 about why the manual was in odd order > R CMD check was more of a check of the latex version of the files, not > the final manual. I was looking at the result of R CMD check, and it was in random order (perhaps file date?), not just a different collation choice. Very

[Rd] Package issue

2009-03-05 Thread Terry Therneau
E file exports diag, along with several other methods that do work. Any help would be appreciated. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Package issue

2009-03-09 Thread Terry Therneau
> 2. R CMD check gives dozens of warnings ... Yes, I see a lot of warnings too, but I think that they can and should be ignored. 1. There is a set where the generic function has "..." and my realization of the generic has a named argument. But this is exactly what the ... is for in a generi

Re: [Rd] Package issue

2009-03-09 Thread Terry Therneau
Duncan, When The generic solve method has "(a, b, ...)" I have "solve.gchol(a, b, full=TRUE, ...)" I was assuming that I would still get an error from CMD check. These are the ones that I argued as "unavoidable". But... I just checked, and none of those were the squawkers, only t

[Rd] reusing routines

2006-05-12 Thread Terry Therneau
rary is already loaded. I looked at the manual page for dyn.load, but don't see anything. What are we missing? Please reply via email, as I don't read this list. (But I likely will start to later this summer, when I port the newest mixed-effects Cox model code over from S). Te

<    1   2