这是我的数据框:
> s
Date Average Treatment SE
1 2014-10-15 4.875 1 1.6304852
2 2014-11-12 6.250 1 0.9955257
3 2014-12-11 0.250 1 0.1636634
4 2015-02-11 1.000 1 0.5000000
5 2015-03-09 0.000 1 0.0000000
6 2014-10-15 22.750 2 3.4369318
7 2014-11-12 10.625 2 2.1207942
8 2014-12-11 7.500 2 2.9215945
9 2015-02-11 7.750 2 2.3126207
10 2015-03-09 0.125 2 0.1250000
Run Code Online (Sandbox Code Playgroud)
我正在使用这段代码制作一个情节:
s$Date <- as.Date(s$Date)
s$Treatment <- factor(s$Treatment)
cols <- c("#000000","#F5F5DC")
library(ggplot2)
solitaryrecruits <- (ggplot(s, aes(x=Date, y=Average, fill=Treatment)) +
geom_bar(width=20, position=position_dodge(20),
stat="identity", colour="black") + …
Run Code Online (Sandbox Code Playgroud) 抱歉,如果这很容易解决,但我无法理解它.
我有这个数据框:
> aaci
Date Plate.1 Plate.2 Plate.3 Plate.4 Plate.5 Plate.6 Plate.7 Plate.8 Average SE Species
1 2014-06-19 0.0000000 0.0000000 0.000000 0.000000 0.0000000 0.0000000 0.000000 0.0000000 0.000000 0.0000000 aa
7 2014-08-04 7.0057778 11.0000000 24.269333 10.439111 28.5724444 92.4604444 5.584000 55.5448889 29.359500 10.7354126 aa
13 2014-09-17 84.4075556 59.2493333 62.664444 38.147556 73.8417778 93.5208889 72.782667 94.5164444 72.391333 6.7116450 aa
19 2014-10-16 56.9840000 64.9733333 45.124444 38.817333 56.2031111 76.4613333 NA 85.4017778 60.566476 6.2339579 aa
25 2014-11-14 75.7146667 72.3604444 62.126222 20.095111 73.9520000 83.8688889 NA 61.5466667 64.237714 7.9248240 …
Run Code Online (Sandbox Code Playgroud)