【发布时间】:2014-10-14 07:21:29
【问题描述】:
我想通过减小斜率值而不是按字母顺序对 x 轴上的植物生长形状因子变量进行排序。我尝试了reorder() 功能,但没有成功。
slope = c(1.0508194, 0.9406335, 1.1271495, 1.0496251,
0.9874658, 0.9358822, 0.8621570, 1.0403310,
1.0380560, 1.0401669)
veg3 <- data.frame(plant_growth_form = as.factor(c("fern", "fern ally", "grass", "herb","herbaceous climber", "herbaceous shrub",
"tree sapling", "undet", "woody climber", "woody shrub")))
ggplot(veg3, aes(x = plant_growth_form, y = slope)) +
geom_point(cex=2) +
xlab("Growth form") + ylab("Slopes") + ylim(0,2) +
theme_bw() + theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank())
可以在以下位置找到使用 dput() 生成的可重现数据子集:如何计算预测数据的标准误差
【问题讨论】: