Applying functions (e.g. mean, sd) across variables
I'd like to apply some standard functions across rows. For example, to get the mean of some scale items on a survey I could use the R code (Q1 + Q2 + Q3) / 3, but if any one of those is missing, the result would be missing. I'd like the result to be the mean of the non-missing values. I'd like to do this in general, so that I could get the median, sd, etc. Is this possible? Thanks!