我想重命名双向ANOVA表的输出。这是表格的代码:
```{r complete model anova weld}
weld$fgage = as.factor(weld$gage); weld$ftime = as.factor(weld$time)
wmoda = aov(weld$strength ~ weld$fgage*weld$ftime); waova = anova(wmoda)
waova2 = round(waova, 2)
options(knitr.kable.NA = '-')
kable(waova2, col.names = c("Df", "Sum Sq", "Mean Sq", "F-Value", "P-
Value"),
caption = '\\label{tab:waova}The two-way ANOVA table for the welding
experiment (complete model).')
```
我想更改最左边一栏中的名称(weld $ fgage,weld $ ftime和weld fgage :weld ftime ),因为它们可以防止桌子变得更美观。
有人知道我会怎么做吗?
谢谢!
答案 0 :(得分:0)
对于此示例,您可以在
之前使用以下代码```{r complete model anova weld}
weld$fgage = as.factor(weld$gage); weld$ftime = as.factor(weld$time)
wmoda = aov(weld$strength ~ weld$fgage*weld$ftime); waova = anova(wmoda)
waova2 = round(waova, 2)
options(knitr.kable.NA = '-')
row.names(waova2)[1:3] = c("Factor A", "Factor B", "Interaction")
kable(waova2, col.names = c("Df", "Sum Sq", "Mean Sq", "F-Value", "P-
Value"),
caption = '\\label{tab:waova}The two-way ANOVA table for the welding
experiment (complete model).')
```