Change background color of combined plots in ggpubr::ggarrange

I can’t figure out why the bottom corners background is white, while the rest of the plot is grey. Is there anyway I can change the bottom corners color to the same background as the rest of the plot? The code im using for each plot is: HP_specifikationer_model1 <- ggplot(Svar_spec_data)+geom_hline(yintercept=0) geom_line(aes(y=HP1, x=kvartaler, color = "HP-BNP-KRE-REN"))… Read More Change background color of combined plots in ggpubr::ggarrange

Pivot_wider: Combine Duplicate Observations AND Create New Variable Columns for Those Values

I’m new to R and have scoured the site to find a solution – I’ve found lots of similar, but slightly different questions. I’m stumped. I have a dataset in this structure: SURVEY_ID CHILD_NAME CHILD_AGE Survey1 Billy 4 Survey2 Claude 12 Survey2 Maude 6 Survey2 Constance 3 Survey3 George 22 Survey4 Marjoram 14 Survey4 LeBron… Read More Pivot_wider: Combine Duplicate Observations AND Create New Variable Columns for Those Values

Displaying percentages within category for continuous/ordered variable (with ggplot)

I have two questions, the first a (hopefully) straightforward mechanical one and the second more theoretical (though still with a technical element). I am trying to do something nearly identical to this question, but I have a variable that is ordered/continuous (0 – 4), instead of a 1/0 dichotomous variable, which means that filtering ==… Read More Displaying percentages within category for continuous/ordered variable (with ggplot)

Adding greek symbol and superscript to ggplot axis text (tickmarks)

I am trying to get the stable oxygen isotope symbol into the axis text (tick mark label) in ggplot. Example data df <- data.frame(author = c("one", "two", "three"), d18O = c("D", "D", "U"), Mg = c("I", "D", "D"), `Drip Rate` = c("U", "I", "I")) %>% pivot_longer(-c(author)) Exmample plot df %>% ggplot(aes(x = name, fill =… Read More Adding greek symbol and superscript to ggplot axis text (tickmarks)