[R] Adding Functionality to stat.table in Epi

From: <rab45+_at_pitt.edu>
Date: Wed 10 Aug 2005 - 03:16:02 EST


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 Received on Wed Aug 10 03:20:25 2005

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