- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我会绘制 metaMDS
的点使用不同的符号。我会对站点进行分类并将其绘制为具有不同符号的点。
我有 89 个站点,我会将它们分成 11 个组,然后绘制它。
你知道我该怎么做吗?
非常感谢。
最佳答案
这是一个使用 中的基图的简单示例素食主义者 .我的blog post里有更多细节在这个问题上。关键是为 11 个组创建一组绘图字符(下面的 pchs
),然后使用包含组成员身份的因子(下面的 grps
)索引该组字符。
require("vegan")
data(dune)
set.seed(123)
sol <- metaMDS(dune)
pchs <- 1:11
grps <- factor(sample(LETTERS[1:11], nrow(dune), replace = TRUE))
## note that not all 11 groups are included in this sample
## but this is just for show - you will have a variable containing
## the group membership data
plot(sol, type = "n", display = "sites")
points(sol, display = "sites", pch = pchs[grps])
require("ggvegan")
scrs <- fortify(sol)
scrs <- subset(scrs, subset = Score == "sites")
## ggplot doesn't like more than 6 groups for shape
grps <- factor(sample(LETTERS[1:6], nrow(dune), replace = TRUE))
scrs <- cbind(scrs, Group = grps) ## add on the group variable
## do the plot
ggplot(scrs, aes(x = Dim1, y = Dim2, shape = Group, colour = Group)) +
geom_point() + coord_fixed()
scale
但这超出了本答案的范围。
fortify
方法接受额外的向量以添加到强化分数,但现在您必须自己添加分组变量。
关于r - metaMDS 的绘图点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16397914/
我一直在对我在不同采样点拥有丰富物种的数据集进行排序。我在 vegan 中使用 metaMDS() 来执行此操作。使用此功能,您可以: 直接输入社区数据(行中的站点和列中的物种)并指定您希望它使用的距
我会绘制 metaMDS 的点使用不同的符号。我会对站点进行分类并将其绘制为具有不同符号的点。 我有 89 个站点,我会将它们分成 11 个组,然后绘制它。 你知道我该怎么做吗? 非常感谢。 最佳答案
我们有一个物种存在表(二进制:1=存在,0=不存在)。当使用 vegan 包的 metaMDS 时,它会在绘制时生成数据的水平分布,而不是集群。 我们尝试使用不同的距离方法(Euclidean、Bra
已结束。 这个问题是 off-topic .它目前不接受答案。 想要改进这个问题? Update the question所以它是on-topic堆栈溢出。 关闭 9 年前。 Improve this
我想编写一份包含 NMS 排序的报告。我想在报告中包含代码,但不包含运行压力。 我试过 message=FALSE, warning=FALSE, results='hide' 但它仍然包含在报告中。
尝试从 vegan 包运行 metaMDS() 时,我不断收到以下错误: my_mds = 8 x64 (build 9200) Matrix products: default attached b
我是一名优秀的程序员,十分优秀!