Setting up the Environment
packages <- c ("tidyverse", "modelsummary", "forcats", "RColorBrewer", "fst", "viridis", "knitr", "kableExtra", "rmarkdown", "ggridges", "questionr")
new_packages <- packages[!(packages %in% installed.packages()[,"Package"])]
if(length(new_packages)) install.packages(new_packages)
lapply(packages, library, character.only = TRUE)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.3 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Loading required package: viridisLite
##
##
## Attaching package: 'kableExtra'
##
##
## The following object is masked from 'package:dplyr':
##
## group_rows
## [[1]]
## [1] "lubridate" "forcats" "stringr" "dplyr" "purrr" "readr"
## [7] "tidyr" "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [13] "grDevices" "utils" "datasets" "methods" "base"
##
## [[2]]
## [1] "modelsummary" "lubridate" "forcats" "stringr" "dplyr"
## [6] "purrr" "readr" "tidyr" "tibble" "ggplot2"
## [11] "tidyverse" "stats" "graphics" "grDevices" "utils"
## [16] "datasets" "methods" "base"
##
## [[3]]
## [1] "modelsummary" "lubridate" "forcats" "stringr" "dplyr"
## [6] "purrr" "readr" "tidyr" "tibble" "ggplot2"
## [11] "tidyverse" "stats" "graphics" "grDevices" "utils"
## [16] "datasets" "methods" "base"
##
## [[4]]
## [1] "RColorBrewer" "modelsummary" "lubridate" "forcats" "stringr"
## [6] "dplyr" "purrr" "readr" "tidyr" "tibble"
## [11] "ggplot2" "tidyverse" "stats" "graphics" "grDevices"
## [16] "utils" "datasets" "methods" "base"
##
## [[5]]
## [1] "fst" "RColorBrewer" "modelsummary" "lubridate" "forcats"
## [6] "stringr" "dplyr" "purrr" "readr" "tidyr"
## [11] "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [16] "grDevices" "utils" "datasets" "methods" "base"
##
## [[6]]
## [1] "viridis" "viridisLite" "fst" "RColorBrewer" "modelsummary"
## [6] "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [11] "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [16] "stats" "graphics" "grDevices" "utils" "datasets"
## [21] "methods" "base"
##
## [[7]]
## [1] "knitr" "viridis" "viridisLite" "fst" "RColorBrewer"
## [6] "modelsummary" "lubridate" "forcats" "stringr" "dplyr"
## [11] "purrr" "readr" "tidyr" "tibble" "ggplot2"
## [16] "tidyverse" "stats" "graphics" "grDevices" "utils"
## [21] "datasets" "methods" "base"
##
## [[8]]
## [1] "kableExtra" "knitr" "viridis" "viridisLite" "fst"
## [6] "RColorBrewer" "modelsummary" "lubridate" "forcats" "stringr"
## [11] "dplyr" "purrr" "readr" "tidyr" "tibble"
## [16] "ggplot2" "tidyverse" "stats" "graphics" "grDevices"
## [21] "utils" "datasets" "methods" "base"
##
## [[9]]
## [1] "rmarkdown" "kableExtra" "knitr" "viridis" "viridisLite"
## [6] "fst" "RColorBrewer" "modelsummary" "lubridate" "forcats"
## [11] "stringr" "dplyr" "purrr" "readr" "tidyr"
## [16] "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [21] "grDevices" "utils" "datasets" "methods" "base"
##
## [[10]]
## [1] "ggridges" "rmarkdown" "kableExtra" "knitr" "viridis"
## [6] "viridisLite" "fst" "RColorBrewer" "modelsummary" "lubridate"
## [11] "forcats" "stringr" "dplyr" "purrr" "readr"
## [16] "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [21] "graphics" "grDevices" "utils" "datasets" "methods"
## [26] "base"
##
## [[11]]
## [1] "questionr" "ggridges" "rmarkdown" "kableExtra" "knitr"
## [6] "viridis" "viridisLite" "fst" "RColorBrewer" "modelsummary"
## [11] "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [16] "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [21] "stats" "graphics" "grDevices" "utils" "datasets"
## [26] "methods" "base"
Loading Data
ess <- read_fst("All-ESS-Data.fst")
Creating a year variable
ess$year <- NA
replacements <- c(2002, 2004, 2006, 2008, 2010, 2012, 2014, 2016, 2018, 2020)
for(i in 1:10){
ess$year[ess$essround == i] <- replacements[i]
}
Subsetting for Germany
Germany <- ess %>%
filter(cntry == "DE")
Selcting and Cleaning Variables of Interest
Germany_data <- Germany %>%
select(
essround, year, #administrative variable
stflife, eduyrs, # 2 Focal Variables
rlgdgr, health, gndr # 3 relevant variables
) %>%
mutate(
eduyrs = ifelse(eduyrs %in% c(77, 88, 99), NA, eduyrs),
stflife = ifelse(stflife %in% c(77, 88, 99), NA, stflife),
health = ifelse(health %in% c(7, 8, 9), NA, health),
rlgdgr = ifelse(rlgdgr %in% c(77, 88, 99), NA, rlgdgr),
gndr = ifelse(gndr %in% c(9), NA, gndr),
) %>%
drop_na()
Creating a time trend of the mean for stflife by year
#Creating a year variable
Germany_data$year <- NA
replacements <- c(2002, 2004, 2006, 2008, 2010, 2012, 2014, 2016, 2018, 2020)
for(i in 1:10){
Germany_data$year[Germany_data$essround == i] <- replacements[i]
}
# Computing the average life satisfaction level for Germany for each year
avg_stflife_germany <- Germany_data %>%
group_by(year) %>%
summarize(avg_stflife = mean(stflife, na.rm = TRUE))
# Creating a table
avg_stflife_germany
## # A tibble: 10 × 2
## year avg_stflife
## <dbl> <dbl>
## 1 2002 6.82
## 2 2004 6.72
## 3 2006 6.72
## 4 2008 6.84
## 5 2010 7.12
## 6 2012 7.48
## 7 2014 7.42
## 8 2016 7.52
## 9 2018 7.67
## 10 2020 7.10
# Producing the visual
Graph_of_yearly_stflife <- ggplot(avg_stflife_germany, aes(x = year, y = avg_stflife)) +
scale_x_continuous(breaks = seq(2000, 2020, by=2), limits = c(2000,2020))+
geom_line(color = "lightblue", size = 1) +
geom_point(color = "darkblue", size = 2) +
labs(title = "Life statisfaction in Germany (2002-2020)",
x = "Year of Survey",
y = "Average level of General Life Satisfaction"
)+
ylim(0, 8)
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Graph_of_yearly_stflife

# Zooming in on the trend
Graph_of_yearly_stflife_zoom <- ggplot(avg_stflife_germany, aes(x = year, y = avg_stflife)) +
scale_x_continuous(breaks = seq(2000, 2020, by=2), limits = c(2000,2020))+
geom_line(color = "lightblue", size = 1) +
geom_point(color = "darkblue", size = 2) +
labs(title = "Life statisfaction in Germany (2002-2020)",
x = "Year of Survey",
y = "Average level of General Life Satisfaction"
)+
ylim(6.5, 8)
Graph_of_yearly_stflife_zoom

Comparing the Main Trend for Germany to ESS baseline
#Computing the average life satisfaction level for each year for all ESS countries
avg_stflife_ESS <- ess %>%
mutate(stflife = ifelse(stflife %in% c(77, 88), NA, stflife)) %>%
group_by(year) %>%
summarize(avg_stflife_ess = mean(stflife, na.rm = TRUE))
# Combining Germany data and ess data
combined_data <- left_join(avg_stflife_germany, avg_stflife_ESS, by = "year")
# Reshaping data to better suit the visualization
long_data <- combined_data %>%
pivot_longer(
cols = starts_with("avg_stflife"),
names_to = "stflife_type",
values_to = "AVG_stflife"
)
# Plotting the Comparison of Germany trend to ESS baseline
p_stflife_comparison <- ggplot(long_data) +
geom_line(aes(x = year, y = AVG_stflife, color = stflife_type), size = 1) +
geom_point(aes(x = year, y = AVG_stflife, color = stflife_type), size = 2) +
scale_x_continuous(breaks = seq(2000, 2020, by=2), limits = c(2000,2020))+
labs(title = "Life Satisfaction Level in Germany (2002-2020)",
x = "Year",
y = "Average Life Satisfaction (0-10 scale)") +
ylim(0,8) +
scale_color_manual(values = c("blue", "darkgrey"),
name = "Dataset",
labels = c("Germany", "All ESS Countries"),
breaks = c("avg_stflife", "avg_stflife_ess")) +
theme_minimal()
p_stflife_comparison

# Zooming in on the trends
p_stflife_comparison_zoom <- ggplot(long_data) +
geom_line(aes(x = year, y = AVG_stflife, color = stflife_type), size = 1) +
geom_point(aes(x = year, y = AVG_stflife, color = stflife_type), size = 2) +
scale_x_continuous(breaks = seq(2000, 2020, by=2), limits = c(2000,2020))+
labs(title = "Life Satisfaction Level in Germany (2002-2020)",
x = "Year",
y = "Average Life Satisfaction (0-10 scale)") +
ylim(6.5,8) +
scale_color_manual(values = c("blue", "darkgrey"),
name = "Dataset",
labels = c("Germany", "All ESS Countries"),
breaks = c("avg_stflife", "avg_stflife_ess")) +
theme_minimal()
p_stflife_comparison_zoom

Computing column percentages for 3-5 explanatory variables relative
to stflife, Providing Mean and Std alongside
# Mediating, Moderating, or Control Variables
library(questionr)
table(Germany_data$stflife, Germany_data$health) %>%
cprop ()
##
## 1 2 3 4 5 All
## 0 1.0 0.7 1.4 3.2 12.1 1.3
## 1 0.4 0.5 1.0 2.4 8.1 0.9
## 2 1.1 1.6 2.4 5.7 8.6 2.2
## 3 1.9 2.7 4.4 9.1 12.9 3.8
## 4 2.1 2.9 5.3 7.5 6.8 4.0
## 5 4.8 7.6 12.8 17.0 15.4 9.6
## 6 4.5 6.5 9.5 10.3 6.6 7.4
## 7 13.5 17.0 18.4 15.3 8.8 16.6
## 8 29.3 30.2 25.7 16.9 10.7 27.3
## 9 22.8 18.3 10.7 6.3 3.9 15.5
## 10 18.7 11.9 8.4 6.2 6.1 11.3
## Total 100.0 100.0 100.0 100.0 100.0 100.0
table(Germany_data$stflife, Germany_data$rlgdgr) %>%
cprop ()
##
## 0 1 2 3 4 5 6 7 8 9 10 All
## 0 2.5 1.0 0.7 1.0 0.6 1.1 0.6 0.7 0.8 0.7 3.3 1.3
## 1 1.5 1.5 1.1 0.7 0.8 0.6 0.4 0.6 0.3 1.3 0.6 0.9
## 2 2.9 2.8 2.3 2.1 2.4 1.7 1.3 1.8 1.8 2.0 1.8 2.2
## 3 5.4 4.3 4.2 4.1 3.2 3.4 2.8 2.7 2.7 1.8 2.6 3.8
## 4 4.9 4.4 4.2 4.5 4.2 3.5 3.3 3.5 2.9 2.8 2.3 4.0
## 5 12.3 9.3 8.6 9.6 8.3 12.3 6.8 6.8 6.8 5.6 10.2 9.6
## 6 8.1 8.8 7.6 7.7 8.4 7.3 7.7 6.8 5.7 4.0 5.3 7.4
## 7 15.8 18.0 18.6 18.9 18.6 16.4 18.9 16.3 13.8 13.4 9.9 16.6
## 8 23.7 27.3 28.9 28.0 29.2 27.9 30.7 30.1 29.3 27.8 19.1 27.3
## 9 12.8 15.5 16.4 14.7 15.1 13.4 16.9 18.6 19.3 25.7 14.9 15.5
## 10 10.0 7.1 7.5 8.7 9.2 12.4 10.6 11.9 16.6 14.8 30.0 11.3
## Total 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0
table(Germany_data$stflife, Germany_data$gndr) %>%
cprop ()
##
## 1 2 All
## 0 1.3 1.3 1.3
## 1 0.9 0.9 0.9
## 2 2.2 2.2 2.2
## 3 3.8 3.7 3.8
## 4 3.9 4.0 4.0
## 5 8.9 10.4 9.6
## 6 7.7 7.1 7.4
## 7 16.9 16.4 16.6
## 8 28.2 26.5 27.3
## 9 15.9 15.1 15.5
## 10 10.2 12.5 11.3
## Total 100.0 100.0 100.0
Computing the means
Germany_data <- Germany_data %>%
mutate(
religiosity = recode (rlgdgr,
'0' = "Not at all religious",
'1' = "1",
'2' = "2",
'3' = "3",
'4'= "4",
'5' = "5",
'6' = "6",
'7' = "7",
'8' = "8",
'9' = "9",
'10' = "Very religious"
),
gender = recode (gndr,
'1' = "Male",
'2' = "Female",
)
)
# For mean and std, use group_by() and summarise by piping with tidyverse
stflife_health <- Germany_data %>%
group_by(health) %>%
summarise(stflife_by_health = mean(stflife, na.rm = TRUE,)
)
sflife_religiosity <- Germany_data %>%
group_by(religiosity) %>%
summarise(stflife_religiosity = mean(stflife, na.rm = TRUE,))
stflife_gender <- Germany_data %>%
group_by(gender) %>%
summarise(stflife_gender = mean(stflife, na.rm = TRUE,))
stflife_health
## # A tibble: 5 × 2
## health stflife_by_health
## <dbl> <dbl>
## 1 1 7.88
## 2 2 7.45
## 3 3 6.76
## 4 4 5.79
## 5 5 4.52
sflife_religiosity
## # A tibble: 11 × 2
## religiosity stflife_religiosity
## <chr> <dbl>
## 1 1 6.91
## 2 2 7.07
## 3 3 7.05
## 4 4 7.16
## 5 5 7.16
## 6 6 7.41
## 7 7 7.43
## 8 8 7.62
## 9 9 7.70
## 10 Not at all religious 6.69
## 11 Very religious 7.59
stflife_gender
## # A tibble: 2 × 2
## gender stflife_gender
## <chr> <dbl>
## 1 Female 7.14
## 2 Male 7.13
Computing Standard Deviation
library(dplyr)
std_health <- Germany_data %>%
group_by(health) %>%
summarise(std_health = sd(stflife))
std_religiosity <- Germany_data %>%
group_by(religiosity) %>%
summarise(std_religiosity = sd(stflife))
std_gender <- Germany_data %>%
group_by(gndr) %>%
summarise(std_gender = sd(stflife))
std_health
## # A tibble: 5 × 2
## health std_health
## <dbl> <dbl>
## 1 1 1.93
## 2 2 1.98
## 3 3 2.19
## 4 4 2.52
## 5 5 3.00
std_religiosity
## # A tibble: 11 × 2
## religiosity std_religiosity
## <chr> <dbl>
## 1 1 2.19
## 2 2 2.10
## 3 3 2.10
## 4 4 2.05
## 5 5 2.13
## 6 6 1.91
## 7 7 2.01
## 8 8 2.04
## 9 9 2.07
## 10 Not at all religious 2.44
## 11 Very religious 2.56
std_gender
## # A tibble: 2 × 2
## gndr std_gender
## <dbl> <dbl>
## 1 1 2.17
## 2 2 2.22
(h) Creating visualization for health relative to stflife
# Recoding labels for health
Germany_data <- Germany_data %>%
mutate(
health = recode (health,
'1' = "Very Good",
'2' = "Good",
'3' = "Fair",
'4' = "Bad",
'5' = "Very Bad"
))
stflife_health <- Germany_data %>%
group_by(health) %>%
summarize(stflife_by_health = mean(stflife, na.rm = TRUE))
# Reordering Levels
stflife_health$health <- factor(stflife_health$health, levels=c('Very Good','Good', 'Fair', 'Bad', 'Very Bad' ))
stflife_health <- stflife_health[order(levels(stflife_health$health)),]
# Producing the Visual
library(viridis)
p_health_stflife <- ggplot(stflife_health, aes(x = health, y = stflife_by_health)) +
geom_segment(aes(xend = health, yend = 0, color = health), size = 1.5)+
#geom_line(color = "blue", size = 1) +
geom_point(color = "black", size = 2.5) +
scale_y_continuous(breaks = 0:10) +
labs(title = "Subjective Health and Life satisfaction in Germany",
x = "Subjective General Health",
y = "General Satisfaction with Life"
)
theme_minimal()
## List of 97
## $ line :List of 6
## ..$ colour : chr "black"
## ..$ linewidth : num 0.5
## ..$ linetype : num 1
## ..$ lineend : chr "butt"
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ rect :List of 5
## ..$ fill : chr "white"
## ..$ colour : chr "black"
## ..$ linewidth : num 0.5
## ..$ linetype : num 1
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_rect" "element"
## $ text :List of 11
## ..$ family : chr ""
## ..$ face : chr "plain"
## ..$ colour : chr "black"
## ..$ size : num 11
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : num 0
## ..$ lineheight : num 0.9
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ title : NULL
## $ aspect.ratio : NULL
## $ axis.title : NULL
## $ axis.title.x :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 2.75points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.x.top :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 2.75points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.x.bottom : NULL
## $ axis.title.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : num 90
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 2.75points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.title.y.left : NULL
## $ axis.title.y.right :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : num -90
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.75points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : chr "grey30"
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 2.2points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x.top :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : num 0
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 2.2points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.x.bottom : NULL
## $ axis.text.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 1
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 2.2points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.text.y.left : NULL
## $ axis.text.y.right :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 0points 2.2points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ axis.ticks : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ axis.ticks.x : NULL
## $ axis.ticks.x.top : NULL
## $ axis.ticks.x.bottom : NULL
## $ axis.ticks.y : NULL
## $ axis.ticks.y.left : NULL
## $ axis.ticks.y.right : NULL
## $ axis.ticks.length : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ axis.ticks.length.x : NULL
## $ axis.ticks.length.x.top : NULL
## $ axis.ticks.length.x.bottom: NULL
## $ axis.ticks.length.y : NULL
## $ axis.ticks.length.y.left : NULL
## $ axis.ticks.length.y.right : NULL
## $ axis.line : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ axis.line.x : NULL
## $ axis.line.x.top : NULL
## $ axis.line.x.bottom : NULL
## $ axis.line.y : NULL
## $ axis.line.y.left : NULL
## $ axis.line.y.right : NULL
## $ legend.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
## ..- attr(*, "unit")= int 8
## $ legend.spacing : 'simpleUnit' num 11points
## ..- attr(*, "unit")= int 8
## $ legend.spacing.x : NULL
## $ legend.spacing.y : NULL
## $ legend.key : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.key.size : 'simpleUnit' num 1.2lines
## ..- attr(*, "unit")= int 3
## $ legend.key.height : NULL
## $ legend.key.width : NULL
## $ legend.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.text.align : NULL
## $ legend.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ legend.title.align : NULL
## $ legend.position : chr "right"
## $ legend.direction : NULL
## $ legend.justification : chr "center"
## $ legend.box : NULL
## $ legend.box.just : NULL
## $ legend.box.margin : 'margin' num [1:4] 0cm 0cm 0cm 0cm
## ..- attr(*, "unit")= int 1
## $ legend.box.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ legend.box.spacing : 'simpleUnit' num 11points
## ..- attr(*, "unit")= int 8
## $ panel.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.border : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ panel.spacing : 'simpleUnit' num 5.5points
## ..- attr(*, "unit")= int 8
## $ panel.spacing.x : NULL
## $ panel.spacing.y : NULL
## $ panel.grid :List of 6
## ..$ colour : chr "grey92"
## ..$ linewidth : NULL
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ panel.grid.major : NULL
## $ panel.grid.minor :List of 6
## ..$ colour : NULL
## ..$ linewidth : 'rel' num 0.5
## ..$ linetype : NULL
## ..$ lineend : NULL
## ..$ arrow : logi FALSE
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_line" "element"
## $ panel.grid.major.x : NULL
## $ panel.grid.major.y : NULL
## $ panel.grid.minor.x : NULL
## $ panel.grid.minor.y : NULL
## $ panel.ontop : logi FALSE
## $ plot.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ plot.title :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 1.2
## ..$ hjust : num 0
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.title.position : chr "panel"
## $ plot.subtitle :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : num 0
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 0points 0points 5.5points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.caption :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 0.8
## ..$ hjust : num 1
## ..$ vjust : num 1
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 5.5points 0points 0points 0points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.caption.position : chr "panel"
## $ plot.tag :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : 'rel' num 1.2
## ..$ hjust : num 0.5
## ..$ vjust : num 0.5
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ plot.tag.position : chr "topleft"
## $ plot.margin : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
## ..- attr(*, "unit")= int 8
## $ strip.background : list()
## ..- attr(*, "class")= chr [1:2] "element_blank" "element"
## $ strip.background.x : NULL
## $ strip.background.y : NULL
## $ strip.clip : chr "inherit"
## $ strip.placement : chr "inside"
## $ strip.text :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : chr "grey10"
## ..$ size : 'rel' num 0.8
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : NULL
## ..$ lineheight : NULL
## ..$ margin : 'margin' num [1:4] 4.4points 4.4points 4.4points 4.4points
## .. ..- attr(*, "unit")= int 8
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.x : NULL
## $ strip.text.x.bottom : NULL
## $ strip.text.x.top : NULL
## $ strip.text.y :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : num -90
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.y.left :List of 11
## ..$ family : NULL
## ..$ face : NULL
## ..$ colour : NULL
## ..$ size : NULL
## ..$ hjust : NULL
## ..$ vjust : NULL
## ..$ angle : num 90
## ..$ lineheight : NULL
## ..$ margin : NULL
## ..$ debug : NULL
## ..$ inherit.blank: logi TRUE
## ..- attr(*, "class")= chr [1:2] "element_text" "element"
## $ strip.text.y.right : NULL
## $ strip.switch.pad.grid : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## $ strip.switch.pad.wrap : 'simpleUnit' num 2.75points
## ..- attr(*, "unit")= int 8
## - attr(*, "class")= chr [1:2] "theme" "gg"
## - attr(*, "complete")= logi TRUE
## - attr(*, "validate")= logi TRUE
p_health_stflife
