datasets
package. It contains several publicly
available datasets. Today you will use CO2
dataset, that
contain Carbon Dioxide Uptake in Grass Plants. For more information
about the dataset content explore https://www.rdocumentation.org/packages/datasets/versions/3.6.2/topics/CO2.Notice: today I will not give you advices to make understandable and nice plots, so be aware that each label and text has to be clear and completely readable (no overlaps, no partial text)!!!!
## Plant Type Treatment conc uptake
## 1 Qn1 Quebec nonchilled 95 16.0
## 2 Qn1 Quebec nonchilled 175 30.4
## 3 Qn1 Quebec nonchilled 250 34.8
## 4 Qn1 Quebec nonchilled 350 37.2
## 5 Qn1 Quebec nonchilled 500 35.3
## 6 Qn1 Quebec nonchilled 675 39.2
Type
) uptake at a concentration equal to 1000
(conc
) for “chilled” and “nonchilled” groups. Visit https://r-graph-gallery.com/4-barplot-with-error-bar.html
if you need guidelines to add errorbars. Choose a color for the bars
that you will use in all plots regarding Quebec and color bars. Add a
test to evaluate differences between chilled and nonchilled values.## condition mean sd
## 1 nonchilled 43.16667 3.061590
## 2 chilled 40.83333 1.913984
## condition mean sd
## 1 nonchilled 43.16667 3.061590
## 2 chilled 40.83333 1.913984
facet_wrap()
or facet_grid()
functions to divide concentration values in the final plot)## condition concentration mean sd
## 1 nonchilled 95 15.26667 1.446836
## 2 nonchilled 175 30.03333 2.569695
## 3 nonchilled 250 37.40000 2.762245
## 4 nonchilled 350 40.36667 2.746513
## 5 nonchilled 500 39.60000 3.897435
## 6 nonchilled 675 41.50000 2.351595
## 7 nonchilled 1000 43.16667 3.061590
## 8 chilled 95 12.86667 3.121431
## 9 chilled 175 24.13333 3.150132
## 10 chilled 250 34.46667 3.927255
## 11 chilled 350 35.80000 2.615339
## 12 chilled 500 36.66667 3.611556
## 13 chilled 675 37.50000 2.100000
## 14 chilled 1000 40.83333 1.913984
facet_wrap()
or facet_grid()
functions to divide concentration values in the final plot)## condition concentration mean sd
## 1 nonchilled 95 15.26667 1.446836
## 2 nonchilled 175 30.03333 2.569695
## 3 nonchilled 250 37.40000 2.762245
## 4 nonchilled 350 40.36667 2.746513
## 5 nonchilled 500 39.60000 3.897435
## 6 nonchilled 675 41.50000 2.351595
## 7 nonchilled 1000 43.16667 3.061590
## 8 chilled 95 12.86667 3.121431
## 9 chilled 175 24.13333 3.150132
## 10 chilled 250 34.46667 3.927255
## 11 chilled 350 35.80000 2.615339
## 12 chilled 500 36.66667 3.611556
## 13 chilled 675 37.50000 2.100000
## 14 chilled 1000 40.83333 1.913984
stat_compare_means()
) and fill boxes according to the
colors you chose for Quebec and Mississippi.t.test()
function from R. Do a
paired and two sides test and keep only the p value. If you need hints
check https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/t.test
. Are there any significant (p value < 0.05) comparisons? If yes, how
many?## Treatment conc t.test
## 1 nonchilled 95 0.07967374
## 2 nonchilled 175 0.05163323
## 3 nonchilled 250 0.05416344
## 4 nonchilled 350 0.03575677
## 5 nonchilled 500 0.09080086
## 6 nonchilled 675 0.05258894
## 7 nonchilled 1000 0.09932695
## 8 chilled 95 0.06347577
## 9 chilled 175 0.12838357
## 10 chilled 250 0.02846345
## 11 chilled 350 0.02832648
## 12 chilled 500 0.03435965
## 13 chilled 675 0.02573668
## 14 chilled 1000 0.02091229
##
## FALSE TRUE
## 8 6
Treatment
) subset of data. The final goal is
to evaluate correlations between uptake values of each couple of plants.
Try both ggpairs()
and ggcorr()
functions.