#' Funció per arrodonir valors p
#'
#' @param x numerical. Any p-value.
#' @param digits integer indicating the number of decimal places.
#' @return Rounded p-value.
#' @export
roundp <- function(x, digits = 3){
lb <- 10^{-digits}
ub <- 1 - 10^{-digits}
p.rounded <- ifelse(x < lb, paste0("<", lb), ifelse(x > ub, paste0(">", ub), round(x = x, digits = digits)))
return(p.rounded)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.