I need to print the result of the Tukey test result within my function of my package. However, CRAN replied that I cannot use print () / cat (). If I use message (), the message does not come out in the format I want, as in print ().
res.aov <- aov(y ~ x, data= data)
tukey<-TukeyHSD(res.aov)
print(tukey$`x[, 1]`)
With print (), the result comes out as I want it to appear on the console:
diff lwr upr p adj
2-1 0.0188276 0.003123183 0.03453202 0.01922062
But with message (), the result looks like this:
0.01882759965134230.003123182712210140.03453201659047440.0192206190347084
Any suggestions for the result to come out as with print ()? Thanks.