R 中P值转化为星号函数
2019-05-30 本文已影响13人
quan575
> p2star <- function(p) symnum(p,cutpoints = c(0,0.01,0.05,1),symbols = c('**','*',''),na = NA)
> as.character(p2star(c(0.03,1,0.2,0.05,NA,0.0003)))
[1] "*" "" "" "*" "" "**"
> p2star <- function(p) symnum(p,cutpoints = c(0,0.01,0.05,1),symbols = c('**','*',''),na = NA)
> as.character(p2star(c(0.03,1,0.2,0.05,NA,0.0003)))
[1] "*" "" "" "*" "" "**"