Plot time trend
plot_time_trend( data, variables, time_variable, filter_value = 1, title = NULL, xlab = NULL, ylab = NULL, var_names = NULL, max_value = 100, color = 0.5, return = c("data", "plot") )
data | Data object |
---|---|
variables | which variables do you want to see |
time_variable | choose between month or wave |
filter_value | which value of response e.g. 1 - most of the time |
title | specify title |
xlab | specify xlab |
ylab | specify ylab |
var_names | to relabel the header on the plot |
max_value | adjust the y axis |
color | change the color, available range = 0-1 |
return | do you want to get data or plot -- I like this to |
plot_time_trend(data = iCARE, variables = c(impacvd_sq003, impacvd_sq001, impacvd_sq002), filter_value = 1, time_variable = wave, # test out for month if you wish var_names = c("impacvd_sq003" = "Depression", "impacvd_sq001" = "Anxiety", "impacvd_sq002" = "Loneliness"), max_value = 25, title = "Trend over waves of survey", return = "plot")#> Error in mutate(., sum_month_status = sum(n), prop_most_time = n/sum_month_status * 100): could not find function "mutate"