Dear R users. 
I am trying to program the comp() routine in package survMisc.                  
                                                                                
          
I am reading the data below with d=read.table( "C:\\. . 
.",fill=TRUE,header=TRUE)
Then I load the packages 'survival' and 'survMisc', library(survival), 
library(survMisc)
 and I run the commands
                                      s=survfit(Surv(d[,2], d[,3])~d[,1], 
data=d)
                                      comp(s)                                   
                
 and I am getting the error
                                       Error in get(t1, loc1) : object 'd[, 2]' 
not found
If instead I use the commands
                                        s=survfit(Surv(T, Status)~Group, data=d)
                                       comp(s)                                  
                   
routine comp()  runs perfectly. However when I am programing I can't see a way 
to know 
in advance the variable names in order to use them.
Can anybody  give me a suggestion?

                     Thanks in advance
                       Endy                        

NB. The data must be stacked in three (3) columns before red.
They are repeated in nine (9) columns for space saving.

GroupTStatusGroupTStatusGroupTStatus

120810155124141
116020111222041
11496011071210631
1146201110124811
1143301332121051
11377022569026411
11330022506023901
1996022409022881
1226022218024211
1119902185702791
11111021829027481
1530021562024861
1118202147002481
11167021363022721
14181210300210741
138312860023811
127612125802101
110412224602531
160912187002801
117212179902351
1487121709022481
1662121674027041
1194121568022111
1230121527022191
1526121324026061
1122129570   
1129129320   
174128470   
1122128480   
1861218500   
14661218430   
11921215350   
11091214470   
1551213840
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to