r - expss 打包成 Markdown PDF
问题描述
我似乎无法让以下代码块在 PDF markdown 中工作,它只能在 HTML 中工作。我尝试通过tinytex重新安装乳胶,但仍然没有任何效果。这里我得到以下错误: 错误:ncol(obj1) is not NULL or ncol(obj2) is not NULL or ncol(obj1) not equal to ncol(obj2)
这是有问题的代码块,因为没有它,文档就会编织。感谢您提供的任何见解。
SPSST %>%
tab_cells(edu.RC, race.RC, relig.RC, age.RC) %>% #rows
tab_cols(total(), income.RC) %>% #columns
tab_weight(popwght) %>% #weights
tab_stat_rpct() %>% #column percents
tab_pivot() %>% #make pivot table (think excel)
set_caption("Cross Tables of Recoded Variables (WEIGHTED)")
解决方案
The best solution is to pass the expss
results to kable
. Add the following commands to your script and it should render into PDF via Rmarkdown.
library(kableExtra)
...
split_table_to_df() %>%
kable() %>% kable_styling()
推荐阅读
- flume - 使用 Tshark 和 Flume 捕获网络流量
- android - Android Studio 在我的项目之间混淆,无法无缝切换
- orange-api - 清洁会话(活动对象橙色)
- r - 如何在R中使用带有外生变量的var进行预测
- java - WebServiceTemplate 客户端 SoapFaultClientException
- vba - 数据透视表中的慢项过滤(.ManualUpdate = True NOT WORKING)
- node.js - 让节点模块与打字稿一起工作
- java - Eclipse Tomcat 服务器未启动
- javascript - JAVASCRIPT 将 div 导出为 PDF 时出错
- python - 在python中从json中提取元素