[R] Adding Functionality to stat.table in Epi
rab45+@pitt.edu
rab45+ at pitt.edu
Tue Aug 9 19:16:02 CEST 2005
The stat.table function in the Epi package won't do standard deviations.
It didn't seem that it would be difficult to add an "sd" function to the
stat.table function. Following the example for the mean, I set up a
similar function for the sd (and included it as an options) but it just
won't work. (I tried sending messages to the Epi mailing list after
subscribing but my mail is always returned. I don't have the exact error
messages at the moment or I would post them.)
Even if I just copy stat.table to stat.table2 and try to run stat.table2,
I get:
> stat.table2(index=list(race,gender),list(count(),percent(race)),margins=TRUE)
Error: couldn't find function "array.subset"
I can't find any "array.subset" function, yet the original stat.table
works just fine.
I've copied other functions and made changes to them and they would work
just fine. I must be missing something here.
Any insights would be appreciated.
Rick B.
More information about the R-help
mailing list