gpt4 book ai didi

r - 如何修复 R markdown 中的 Kable 表错误?

转载 作者:行者123 更新时间:2023-12-04 03:48:26 33 4
gpt4 key购买 nike

我从 2 个向量手动创建了这个数据集:

Classe <- c("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q")
Renda <- c("Nenhuma","Até R$998", "R$ 998,01 à R$ 1.497","R$ 1.497,01 à R$ 1.996","R$ 1.996,01 à R$ 2.495","R$ 2.495,01 à R$ 2.994","R$ 2.994,01 à R$ 3.992","R$ 3.992,01 à R$ 4.990","R$ 4.990,01 à R$ 5.988","R$ 5.988,01 à R$ 6.986","R$ 6.986,01 à R$ 7.984","R$ 7.984,01 à R$ 8.982","R$ 8.982,01 até R$ 9.980","R$ 9.980,01 até R$ 11.976","R$ 11.976,01 à R$ 14.970","R$ 14.970,01 à R$ 19.960","Mais de R$ 19.960")

东风:

dfRenda <- data.frame(Classe,Renda)

都是17行。当我调用 View 时,它完美显示

但是当我调用 Kable 函数以增强视觉效果时,我不断遇到这个奇怪的错误,其中 C 标签丢失但合并到另一列中

Rmarkdown 中的错误:

enter image description here

最佳答案

将格式设置为“简单”效果很好:

knitr::kable(dfRenda, format = "simple")

enter image description here

关于r - 如何修复 R markdown 中的 Kable 表错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64759608/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com