R/signifStars.R

signifStars <- function(pv) {
  cutpoints = c(0.001, 0.01, 0.05, 0.1)
  symbols = c("***", "** ", "*  ", ".  ")
  func <- function(x) {
    ind <- which(x < cutpoints)[1]
    if( is.na(ind) ) "" else symbols[ind]
  }
  sapply(pv, func)
}
kecoli/mpo documentation built on May 20, 2019, 8:34 a.m.