R/sign.star.R

Defines functions sign.star

#############
# sign.star #
#############

# function that convert significance of results in stars

sign.star <- function(x){
  
  if(is.na(x)){
    
    sign <- NA
  
    } else {
      
      if(x>=0.1){
        sign <- ""
      }else if((0.1>x) & (0.05<=x)){
        sign <- "."
      }else if((0.05>x) & (0.01<=x)){
        sign <- "*"
      }else if((0.01>x) & (0.001<=x)){
        sign <- "**"
      }else if(0.001>x){
        sign <- "***"
      }
      
      return(sign)
      
    }
  
}

Try the mppR package in your browser

Any scripts or data that you put into this service are public.

mppR documentation built on Jan. 6, 2023, 1:23 a.m.