Re: [R] Survfit error

2014-03-07 Thread Therneau, Terry M., Ph.D.
library's character.only argument. Bill Dunlap TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Hadley Wickham Sent: Friday, March 07, 2014 7:46 AM To: Therneau, Terry M., Ph.D. Cc: R-help; Thomas

Re: [R] Survfit error

2014-03-07 Thread William Dunlap
.@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Hadley Wickham > Sent: Friday, March 07, 2014 7:46 AM > To: Therneau, Terry M., Ph.D. > Cc: R-help; Thomas Lumley > Subject: Re: [R] Survfit error > > On Fri, Mar 7, 2014 at 6:46 AM, Therneau, Terry M., Ph.D.

Re: [R] Survfit error

2014-03-07 Thread Hadley Wickham
On Fri, Mar 7, 2014 at 6:46 AM, Therneau, Terry M., Ph.D. wrote: >>> The help page for the survfit function says it expects a formula as its >>> first argument so try: >>> >>> > sleepfit <- survfit(Surv(timeb, death)~1, data = sleep) >>> >>> David >>> Sent from my iPhone ... so unable to test. >>>

Re: [R] Survfit error

2014-03-07 Thread Therneau, Terry M., Ph.D.
The help page for the survfit function says it expects a formula as its first argument so try: > sleepfit <- survfit(Surv(timeb, death)~1, data = sleep) David Sent from my iPhone ... so unable to test. This was a recent (well, 2007) change in behaviour. Previously the function did some tricks

Re: [R] Survfit Error

2014-03-06 Thread oxnard
Hi David, Thank you! Lucy From: David Winsemius [via R] [mailto:ml-node+s789695n4686317...@n4.nabble.com] Sent: Thursday, 6 March 2014 8:38 PM To: Lucy Leigh Subject: Re: Survfit Error The help page for the survfit function says it expects a formula as its first argument so try: > sleepfit <- s

Re: [R] Survfit Error

2014-03-06 Thread Thomas Lumley
On Thu, Mar 6, 2014 at 3:35 AM, David Winsemius wrote: > The help page for the survfit function says it expects a formula as its > first argument so try: > > > sleepfit <- survfit(Surv(timeb, death)~1, data = sleep) > > David > Sent from my iPhone ... so unable to test. > > This was a recent (well

Re: [R] Survfit Error

2014-03-06 Thread David Winsemius
The help page for the survfit function says it expects a formula as its first argument so try: > sleepfit <- survfit(Surv(timeb, death)~1, data = sleep) David Sent from my iPhone ... so unable to test. > On Mar 6, 2014, at 12:07 PM, Lucy Leigh wrote: > > > Hi everyone, > I am not new to R,

[R] Survfit Error

2014-03-05 Thread Lucy Leigh
Hi everyone, I am not new to R, but new to running survival models in R. I am trying to create some basic KM curves, using the following code: library(survival) library(KMsurv) (import data etc - basic right censored, with continuously observed time of death) sleepfit <- survfit(Surv(timeb,