Different useful snippets in R
Contents
Different useful snippets in R#
Plotting#
Regression coefficients with parameters
package
Sometimes one wants to change the color of the plots, e.g. according to significance
linear models#
Generate mixed effect model equation#
Data manipulations#
Split continuous to categorical at specific breakponts
tdf<- tdf %>%
mutate(
wave = case_when(
session < 6 ~ "first_wave",
session >= 6 & session < 14 ~ "summer_nowave",
session >= 14 ~ "second_wave"
)
)