Please ignore my previous message.....I was able to figure out a solution..
here it is..
nlen <- function(x) length(na.omit(x))
tabular(((p=factor(p))*(a=factor(a))+1) ~ (b + c)*
((N=nlen)+mean+sd),data=a)
Thanks,
Santosh
On Thu, Jun 13, 2013 at 4:16 PM, Santosh <santosh2005@gmail.com> wrote:
> Dear Rxperts,
>
> Is there a way to exclude NAs while computing the summary statistics using
> "tables" package?
>
> I would also like the "count" (length(x,na.rm=T) included for
each column
> ...
>
> a <- data.frame(p=rep(c("A","B"),each=10,len=30),
> a=rep(c(1,2,3),each=10),id=seq(30),
> b=round(log(runif(30,-10,20))),
> c=round(log(runif(30,40,70))))
>
> tabular(((p=factor(p))*(a=factor(a))+1) ~ (b + c)* ((N=1)+mean+sd),data=a)
>
> Thanks so much..
> Santosh
>
[[alternative HTML version deleted]]