Hi all, I have a data frame with some measured values of some animals. Sometimes the measurement failed, resulting in a NA for a measurement and sometimes the animal died, resulting in NA for all measurements. I have several groups of animals. How do I find the size of each group with only alive animals? And how do I find the size of the groups for each measurement? An example: l1 <- list(factor=c(24,24,24), val1=c(2, 3, NA), val2=c(4, NA, NA)) df <- as.data.frame(l1) df$factor <- factor(df$factor) The size of factors should be 2 and not 3. The number of measurement in val1 should be 2 and the number of measurements in val2 should be 1 Thanks in advance for any help and suggestions Ulrik [[alternative HTML version deleted]]