##插入数据
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()
微信扫一扫
##插入数据
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()
相关推荐