[R] relsurv package

Yihui Xie xieyihui at gmail.com
Wed Sep 10 11:27:12 CEST 2008


For the second question, try something like:

> strptime('12/4/1996','%M/%d/%Y')
[1] "1996-09-04 00:12:00"
# only date?
> as.Date(strptime('12/4/1996','%M/%d/%Y'))
[1] "1996-09-04"

Yihui

On Wed, Sep 10, 2008 at 4:22 PM, Giulia Barbati <g.barbati at yahoo.com> wrote:
>
> Dear R-users,
>
> I have a couple of questions about the relsurv package:
>
> 1) when I try to run the example:
>
> fit <- rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata)
>
> with the datasets in the package (rdata and slopop) it gives me an error:
>
> Error in nrow(x) : object "x" not found
>
> 2)
> If I have a date format like:"6/17/1997 " "9/10/1990 " "12/4/1996 " how
> to convert it in the Rdate format required by ratetable?
>
> Thank you very much for help,
>
> Giulia
>
>
>

-- 
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China



More information about the R-help mailing list