r - xtable在对齐后不隐藏行名或hline
问题描述
一般来说,我是 xtable 和 R 的新手。我有一个 pdf 文档,我想包含一个具有指定列宽的表格。我尝试通过阅读我可以在网上找到的内容来玩一些格式。align
但是,在使用该函数设置列宽后,我无法删除行名和 hline 。
ortho <- xtable(orthoInstructions,
include.rownames = FALSE,
hline.after = NULL)
align(ortho) <- c("p{0.1cm}","p{6cm}",
"p{16cm}")
print(ortho)
structure(list(Name = c("Aspirin only", "Clopidogrel or other -grels only",
"Dual Antiplatelet (Aspirin AND Clopidogrel or other -grels)",
"NSAIDS for pain (e.g. ibuprofen, naproxen, diclofenac)"), PlanNormal = c("Stop 7 days before surgery",
"Stop 3 to 7 days before surgery (PAC Nurse to advise)", "PAC Nurse to advise (Dual antiplatelets) - discuss with surgeon and anaesthetist",
"Stop 2 days before surgery")), row.names = c(NA, -4L), class = c("tbl_df",
"tbl", "data.frame"))
我错过了什么明显的东西吗?
解决方案
推荐阅读
- php - 当我在 Laravel 中调用方法时,许多特征中只有一个返回 BadMethodCallException
- mongodb - 在 Kotlin 中为 findAllOrderByFieldDesc 生成 mongodb 查询
- c# - 使用 UsernamePasswordProvider 连接到 MS Graph
- python - 如何在 django-tenant 中创建用于注册租户的 API?
- r - 如何将数据框转换为 R 上的 ts 对象
- python-3.x - 如果我们使用 Python 找到另一个具有相同值的 english_text,则清理 json 数据并删除具有“None”值的 dutch_text
- python - sklearn.LogisticRegression ValueError:未知标签类型:“连续”
- azure - 天蓝色队列如何重试失败的消息?
- abbyy - Abbyy Flexicapture Cloud 的导出路径
- python - django-elasticsearch-dsl:如何搜索多个文档?