# 创建一个示例数据向量
data <- c(10.48, 3.6, 10.15, 12.325, 10.46, 4.6, 9.4, 6.15, 11.625, 9.733333, 12, 17.5)
# 计算数据的范围
data_range <- round(range(data), 3)
cat("数据范围:", data_range[1], " - ", data_range[2], "\n")
# 计算数据的均值
data_mean <- round(mean(data), 3)
cat("数据均值:", data_mean, "\n")
# 计算标准误差
data_se <- round(sd(data) / sqrt(length(data)), 3)
cat("标准误差:", data_se, "\n")
# 计算均值加减标准误
lower_limit <- round(data_mean - data_se, 3)
upper_limit <- round(data_mean + data_se, 3)
cat("均值加减标准误:", lower_limit, " - ", upper_limit, "\n")
标签:示例,标准误差,数据,均值,data,范围 From: https://www.cnblogs.com/wzbzk/p/17802253.html