Statistics with R - Calculate the Mean, Median, and Standard Deviation

#define vector x 
x <- c(32.06,31.98,31.95,31.96,32.04,32.01,32.03,32.05,31.99,32.00)
#calculate mean 
result.mean <- mean(x)
print(result.mean)
#calculate median
median.result <- median(x)
print(median.result)
#calculate standard deviation
sd(x)

你可能感兴趣的:(统计学)