##插入数据
mydata<- data.frame(age=numeric(0),gender=character(0),weight=numeric(0))
mydata<-edit(mydata)
##绘图-存储
pdf("mygraph.pdf")
attach(mtcars)
plot(wt,mpg)
abline(lm(mpg~wt))
title("Regression of MPG")
detach(mtcars)
dev.off()
R-实战1
阅读 44
2022-01-24
##插入数据
mydata<- data.frame(age=numeric(0),gender=character(0),weight=numeric(0))
mydata<-edit(mydata)
##绘图-存储
pdf("mygraph.pdf")
attach(mtcars)
plot(wt,mpg)
abline(lm(mpg~wt))
title("Regression of MPG")
detach(mtcars)
dev.off()
相关推荐
精彩评论(0)