I have a column "Year" in my dataframe ("import") and I need to only select 2015 out of some 30 years. However none of the steps I tried worked. Things I tried include:
iy2015<-subset(import, import$year==2015)
iy2015<-import[which(import$year==2015),]
iy2015<-import[import$year==2015,]
all have given me an empty dataframe.
$yearwhen it should be$Year. This is a typo and should be closed as such.subsetand noting that you say its name is "Year", then DO pay close attention to spelling. Try:iy2015<-subset(import, Year==2015)