I try to pass the first value of Species
column (after filtering) intro the paste()
command for the title=
. But this does not work. Could anybody suggest a solution?
It should work for whatever species I select in filter(...)
iris%>%
filter(Species=="setosa")%>%
ggplot(aes(Sepal.Length, Sepal.Width))+
geom_point()+
labs(title=paste("Length vs Width for ", Species[[1]]))