library(ggplot2)
text<-"
name,date,value
PLT,2017-01-01,40
PLT,2017-01-03,37
"
mydata<-read.table(header=TRUE,sep=",",text=text)
mydata$date<-as.Date(mydata$date)
ggplot(mydata,aes(date,value))+geom_line()
上面的代码在rstudio上获得了" r会议",而在在线编译器上取得了成功。
我在rgui中运行代码,因此我认为我的rstudio可能会有一些问题。但是我仍然不知道为什么。