make.label.Rd
make.label
Mainly used to prettyfy the rownames of anova tables.
make.label(x, l = list(l1 = c("_", " at "), l2 = c(":", " interaction with "), l3 = c(".", " ")))
x | Character |
---|---|
l | List Each first element is gsubised by the second element of the list |
A character
Replace with gsub
function each first element of l[[i]]
by the second element of l[[i]]
for each element of x.
#> Analysis of Variance Table #> #> Response: y_numeric #> Df Sum Sq Mean Sq F value Pr(>F) #> y_logistic 1 2.96 2.962 2.6426 0.1049 #> GROUP:TIMEPOINT 17 1398.30 82.253 73.3932 <2e-16 *** #> Residuals 358 401.22 1.121 #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1rownames(an)=make.label(rownames(an), l=list( l1=c("y_logistic","A logistic variable"), l2=c(":"," interaction with ")) ) # Gives: an#> Analysis of Variance Table #> #> Response: y_numeric #> Df Sum Sq Mean Sq F value Pr(>F) #> A Logistic Variable 1 2.96 2.962 2.6426 0.1049 #> GROUP Interaction With TIMEPOINT 17 1398.30 82.253 73.3932 <2e-16 *** #> Residuals 358 401.22 1.121 #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1