COMPASS-DOE / ec1_ghg_paper

Data analysis and visualization codes for EC1 greenhouse gas manuscript
MIT License
0 stars 0 forks source link

HSD letters for Figure 2 #1

Open kaizadp opened 10 months ago

kaizadp commented 10 months ago

https://github.com/COMPASS-DOE/ec1_ghg_paper/blob/main/R_scripts/4_Fig2_gases_by_location.R

@kaizadp

kaizadp commented 9 months ago

@peterregier

Does this work? One warning - the results are a little different from what you had previously, I think because of how the stats are done. I think previously (stat_compare_means) you did comparisons for each individual pair, whereas aov/HSD looks at all the groups together.

image

kaizadp commented 9 months ago

Also, this is my weird workaround to "functionize" the aov/HSD. I tried to functionize the variable ("var") directly in the aov() code, but I couldn't. So instead, I pulled it out and renamed it to "variable" so it is streamlined from here.

https://github.com/COMPASS-DOE/ec1_ghg_paper/blob/152894c4fdc6744cde8ec0a164f499c1c6d06785/R_scripts/4_Fig2_gases_by_location.R#L58-L62