lm_report.Rd
Report of lm coefficients with p-value
If a categorical variable is used, should be as x
argument
lm_report(data, x, y)
A data.frame
name of x
variable (categorical variable)
name of y
variable (continuous variable)
A character of lm coefficients and p-value
# Summarize data by ID
sum_data <- data_501 |>
dplyr::group_by(ID) |>
dplyr::summarise_all(dplyr::first)
# Map categorical data
sum_data <- map_cat_data(sum_data, meta_data_501)
# ANOVA correlation with p-value
# Categorical variable, SEX, as x argument
lm_report(sum_data, x = "SEX", y = "WT")
#> [1] "(Intercept):74.147 (p<0.001)/Female:5.914 (p:0.094)"