I have a file with daily data for multiple years. I would like to calculate the skewness for every month for a variable. I have multiple files as data.frame. I guess a similar question might have been answered before - the answer must lie somewhere in the moments or e1071 package, but I couldn't figure it out yet.
Is there a skewness function in R than can help me that is similar to one of the formulas for mean and standard deviation below?:
# take average of a column per month
MEAN1 <- ddply(FILENAME, c("Month"), function(x) colMeans(x[c("variable1", "variable2")]))
#take standard deviation of all columns per month
sd1 <- ddply(FILENAME, .(Month), colwise(sd))
#whereafter I delete the non-relevant columns
I would like the final result to be something like:
month variable1skewness
01 1.5
02 2.1
03 2.4
04 2.2
05 2.6
06 1.8
07 3.3
08 4.1
09 3.4
10 3.2
11 4.1
12 1.9
All help is appreciated!! Thanks