I am new to ggplot2 and I can't to get my graphs to work.
I am trying to do kinda simple facet_wrap plots, plotting total dry weight oder Shell lenght and "facet_wrap" it for the different sites at which i sampled. But i always get the error message: layout_base
graph<-ggplot(data=data, aes(x=sL, y=tdw, colour=species))+geom_point(data = data, size =3)+theme_bw()
> graph1<-graph+labs(x="shell length in (mm)" , y= "Shell dry weight")
> graph1
> graph2<-graph1+facet_wrap(Site~)
Fehler: Unerwartete(s) ')' in "graph2<-graph1+facet_wrap(Site~)"
> graph2
Fehler in layout_base(data, cols, drop = drop) :
At least one layer must contain all variables used for facetting
does anybody know where how i could fix this problem??
Thank you for the help