[R] Help with stat.table in Epi package,

From: Troy S <troysocks-twigs_at_yahoo.com>
Date: Fri, 13 Jun 2008 16:19:34 -0700 (PDT)


R Fans--

I am having problems with the following code. It worked under R 2.6.0 but not in 2.7.0.

> library(Epi)
> df <- read.table( "c:/Documents and Settings/Troy S/My Documents/debug_chisq_080613b.txt")
> summary(df)

      cvd agecat

 Min.   :0.0000   (0,40] :1  
 1st Qu.:0.0000   (40,60]:2  
 Median :0.0000              
 Mean   :0.3333              
 3rd Qu.:0.5000              
 Max.   :1.0000              

> fa <- as.factor(df$cvd)
> fb <- as.factor(df$agecat)
> stat.table(index=list("a"=fa, "b"=fb))
Error in eval(expr, envir, enclos) : could not find function "count"

The file contents is

"cvd" "agecat"
"1" 0 "(0,40]"
"2" 1 "(40,60]"
"3" 0 "(40,60]"

My sessionInfo is

R version 2.7.0 (2008-04-22)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:

[1] stats4    splines   stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] Epi_1.0.8         coin_0.6-9        modeltools_0.2-15 mvtnorm_0.9-0    
[5] survival_2.34-1

loaded via a namespace (and not attached): [1] tools_2.7.0
>

Any help would be great!

Troy

        [[alternative HTML version deleted]]



R-help_at_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. Received on Fri 13 Jun 2008 - 23:22:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jun 2008 - 23:31:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive