Re: [R] Adding Functionality to stat.table in Epi

From: Greg Snow <greg.snow_at_ihc.com>
Date: Wed 10 Aug 2005 - 03:20:51 EST


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@ihc.com
(801) 408-8111

>>> <rab45+@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@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

R-help@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 Received on Wed Aug 10 03:27:49 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:45 EST