Skip to contents

plot_age

Usage

plot_age(data, y_var, x_var = "age", y_lab = NULL, x_lab = "Age")

Arguments

data

input data.frame

y_var

y-axis variable to plot

x_var

x-axis variable to plot

y_lab

y-axis label

x_lab

x-axis label

Value

ggplot figure of y-axis variable and age

Examples

data <- data.frame(age = c(20, 30, 40, 50), score = c(4, 6, 7, 9))
plot_age(data, y_var = "score")
#> `geom_smooth()` using formula = 'y ~ x'