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 session aborted",但是在网上找了个编译器顺利通过。已经检查过发现是ggplot那一行代码没法通过,然后ggplot这个函数本身也没问题,因为ggplot(economics,aes(date,unemployment))+geom_line()
这行代码就没有问题