我如何生成用于丰度的散点图和带有门索对象的数值变量?
我在R中有一个Teyloseq对象,并且我想生成散点图,以显示单个分类单元与样本数据中的数字变量之间的关联(即我在x轴上的变量,y轴上的特定分类单元)。 我想我需要发挥某种循环功能,但是我对如何开始有点困扰!
I have a phyloseq object in R, and I would like to generate scatterplots to show associations between individual taxa and a numeric variable that's in my sample data (i.e. my variable on x axis, abundance of particular taxa on y axis).
I guess I need to make some sort of loop function, but I'm a bit stuck on how to get started with this!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有关
tidyverse
解决方案,请参见下文。我使用GlobalPatterns
来自Thyloseq
的数据创建一个可重复的示例。我没有足够的声誉来发布图像,但是输出应该看起来像由>
See below for a
tidyverse
solution. I used theGlobalPatterns
data fromphyloseq
to create a reproducible example. I haven't got enough reputation to post images, but the output should look like thisCreated on 2022-08-12 by the reprex package (v2.0.1)