I want to show change in biomass within certain time period. In each graph there will be two lines i.e of wet biomass and dry biomass. I want to make three separate graphs for each treatment.
The weeding0, 1 and 2 are the treatments. The date refers to the time they were placed in the research site. So June-July means that the samples were installed on June and was retrieved in July. I tried to plot a simple ggplot graph but didnt get any lines in the graph.
ggplot(data=data) + geom_line(aes(y = Weeding1, x = Date_1, colour = State))
Example data
Weeding1 State Date Weeding2 State Date Weeding0 State Date
5.65 Wet June-July 5.4 Wet June-July 5.5 Wet June-July
4.88 Dry June-July 4.73 Dry June-July 4.7 Dry June-July
5.38 Wet June-sept 5.25 Wet June-sept 5.05 Wet June-sept
3.93 Dry June-sept 3.9 Dry June-sept 3.78 Dry June-sept
5.5 Wet July-sept 5.5 Wet July-sept 5.33 Wet July-sept
4.43 Dry July-sept 4.35 Dry July-sept 4.13 Dry July-sept
7.03 Wet July-oct 6.46 Wet July-oct 6.77 Wet July-oct
5.06 Dry July-oct 5.27 Dry July-oct 5.2 Dry July-oct
6.31 Wet June-oct 4 Wet June-oct 4.86 Wet June-oct
3.24 Dry June-oct 3.07 Dry June-oct 3.11 Dry June-oct
Thank you for your time
Edit
I rearranged my data
Date(weeding1) Wet Dry
July 5.65 4.88
June 20 7.11
September 5.38 3.93
October 6.31 3.24
ggplot(Litter1, aes(x = Date))+ geom_point(aes(y = Wet, colour = "Wet"))+ geom_point(aes(y = Dry, colour = "Dry"))
With this I got point but even if I add +geom_line() in the end I am not getting the line. Thanks
I got it with this.
ggplot(Litter1, aes(x = Date,group=1))+ geom_point(aes(y = Wet, colour = "Wet"))+ geom_point(aes(y = Dry, colour = "Dry"))
My code for DUMBELL
df <- structure(list(State = structure(c(2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 1L), .Label = c("Dry", "Wet"), class = "factor"), Date = structure(c(3L, 3L, 5L, 5L, 4L, 4L, 3L, 3L, 5L, 5L, 4L, 4L, 3L, 3L, 5L, 5L, 4L, 4L), .Label = c("July-oct", "July-sept", "June-July", "June-oct", "June-sept"), class = "factor"),treatment = c("Weeding1", "Weeding1", "Weeding1", "Weeding1", "Weeding1", "Weeding1", "Weeding2", "Weeding2", "Weeding2", "Weeding2", "Weeding2", "Weeding2", "Weeding0", "Weeding0", "Weeding0", "Weeding0", "Weeding0", "Weeding0"), value = c(5.65, 4.88, 5.38, 3.93, 6.31, 3.24, 5.4, 4.73, 5.25, 3.9, 4, 3.07, 5.5, 4.7, 5.05, 3.78,4.86, 3.11),row.names = c(NA, -30L), .Names = c("State", "Date", "treatment", "value"), class = "data.frame"))