Re: [R] PrettyR (describe)

2008-06-19 Thread Chuck Cleland
On 6/19/2008 1:54 PM, stephen sefick wrote: #is there a way to get NA in the table of descriptive statistics instead of the function stopping Thank you in advance Replace sd() with something like this: mysd <- function(x, na.rm=TRUE){ifelse(all(is.na(x)), NA, sd(x, na.rm=TRUE))} Or con

[R] PrettyR (describe)

2008-06-19 Thread stephen sefick
#is there a way to get NA in the table of descriptive statistics instead of the function stopping Thank you in advance #data x.f <- structure(list(Site = structure(c(9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L), .Label = c("BC", "HC",