tidy_exwas_result <- function(x) {
# transform rownames into 1st row
tidy_fit <- tibble::rownames_to_column(x, var = "Exposure") %>%
# pick the row for an exposure only, ignore coef. for
# intercept and confounders
.[2, ] %>%
dplyr::mutate(CI = stringr::str_c(round(`2.5 %`, 2), round(`97.5 %`, 2), sep = "; "),
estCI = stringr::str_c(round(estimate, 2), " (", CI, ")", sep = ""),
p_value = round(p.value, 3)) %>%
dplyr::select(-c(std.error, statistic, df, p.value)) %>%
dplyr::rename(Estimate = estimate, conf_low = "2.5 %", conf_high = "97.5 %")
return(tidy_fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.