||
#“line2P” # y=a*x+b
#“line3P” # y=a*x^2+b*x+c
#“log2P” # y=a*ln(x)+b
#“exp3P” # y=a*exp(b*x)+c
#“power3P” # y=a*x^b+c)
#install.packages("basicTrendline")
#Pan-genome,“power3P”
#Core-genome,"exp3P"
library(basicTrendline)
data1<-read.csv("pan.csv",header = TRUE)
x <- data1$x
y <- data1$y
p1<-trendline(x,y,model="power3P", ePos.x= "top")
data2<-read.csv("Core.csv",header = TRUE)
x <- data2$x
y <- data2$y
p2<-trendline(x,y,model="exp3P", ePos.x= "top")
参考来自:http://blog.sina.com.cn/s/blog_6ac25ea00102yfpc.html
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-12-28 00:17
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社