plot_by_age.Rd
plot_by_age
plot_by_age( data, age_var = "age", y_var = NULL, age_label = "Age", y_label = NULL )
data | data.frame |
---|---|
age_var | |
y_var | |
age_label | |
y_label |
plot with x-axis of age and y-axis of y_var
df_fake <- data.frame(age = sample(20:100, 100, TRUE), outcome = sample(1:100/100, 100, TRUE)) plot_by_age(df_fake, y_var = 'outcome')#>