||||
R语言中系统发育树方向的设置、更改
熊荣川
xiong rongchuan
六盘水师范学院生物信息学实验室
xiongrongchuan@126.com
http://blog.sciencenet.cn/u/Bearjazz
通常的系统发育树方向是朝右的,即根在左,末梢在右。在R语言中可以进行方向的修改。
library(ape)
tr <- read.tree(text ="((a:1,b:1):1,(c:1,d:1):1);") #直接在屏幕上输入树文件
plot(tr, direction ="rightwards") #朝右,这也是默认的方向
plot(tr, direction = "leftwards") #朝左
plot(tr, direction = "upwards") #朝上
plot(tr, direction = "downwards") #朝下
就这么简单,祝您科研愉快!
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-5-23 21:01
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社