This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# function to add the right amount of d for align argument of modelsummary according to models | |
align_d <- function(models) rep("d", length(models)) |> c("l", ... = _) |> paste0(collapse = "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print.kableExtra <- function (x, ...) { | |
view_html <- getOption("kableExtra_view_html", TRUE) | |
if (view_html & interactive()) { | |
dep <- list( | |
rmarkdown::html_dependency_jquery(), | |
rmarkdown::html_dependency_bootstrap(theme = "cosmo"), | |
kableExtra::html_dependency_kePrint(), | |
kableExtra::html_dependency_lightable() | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
corstarsl <- function(xx){ | |
require(Hmisc) | |
x <- as.matrix(xx) | |
R <- rcorr(x)$r | |
p <- rcorr(x)$P | |
## define notions for significance levels; spacing is important. | |
mystars <- ifelse(p < .001, "***", ifelse(p < .01, "** ", ifelse(p < .05, "* ", " "))) | |
## trunctuate the matrix that holds the correlations to two decimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chmod -R 757 /var/log/shiny-server/ |