I want to filter data inside the R script in the R visual, so I can make and display calculations such as covariance and others based on the years the data was collected.
I tried this:
Code:
library(plyr)
filter2015<-dataset$yr==2015
filter2016<-dataset$yr==2016
filter2017<-dataset$yr==2017
filter2018<-dataset$yr==2018
d2015<-dataset[filter2015,]
d2016<-dataset[filter2016,]
d2017<-dataset[filter2017,]
d2018<-dataset[filter2018,]
min2015<-min(d2015)
min2016<-min(d2016)
min2017<-min(d2017)
min2018<-min(d2018)
min2<-data.frame(min2015,min2016,min2017,min2018)
plot(min2$yr,min2$valor,col=min2yr,pch=c(16,17,18),xlab="aņo",ylab="valor")
and I am getting the following error

-- removed inline image ---