[R] Adding Functionality to stat.table in Epi

Greg Snow greg.snow at ihc.com
Tue Aug 9 19:20:51 CEST 2005


After you copy stat.table to stat.table2 and modify stat.table2
try:

> environment(stat.table2) <- environment(stat.table)

(you should only need to do that 1 time after creating/editing
stat.table2).

hope this helps,

Greg Snow, Ph.D.
Statistical Data Center, LDS Hospital
Intermountain Health Care
greg.snow at ihc.com
(801) 408-8111

>>> <rab45+ at pitt.edu> 08/09/05 11:16AM >>>
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.

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list