Changing significance symbols in anova

In anova.lm, I want to change the significance characters in the final column to different unicode symbols. I have looked through anova.lm and some of the functions it calls and cannot figure out how to change these. Dan

library(emo)

fit <- anova(lm(sr ~ ., data = LifeCycleSavings))
faux <- as.data.frame(fit, signif.stars = FALSE)

the_sillies <- c(ji('blush'),ji("ok"),ji("laugh"),ji("poop"))
                
# manually

faux[1,6] <- the_sillies[1]                  
faux[2,6] <- the_sillies[4]
faux[3,6] <- the_sillies[4]
faux[4,6] <- the_sillies[3]

faux
#>           Df    Sum Sq   Mean Sq    F value       Pr(>F)   V6
#> pop15      1 204.11757 204.11757 14.1157322 0.0004921955   😊
#> pop75      1  53.34271  53.34271  3.6889104 0.0611254598   💩
#> dpi        1  12.40095  12.40095  0.8575863 0.3593550848   💩
#> ddpi       1  63.05403  63.05403  4.3604959 0.0424711387   😂
#> Residuals 45 650.71300  14.46029         NA           NA <NA>

Great, thank you! I hadn't thought of adding it afterwards! Dan

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.