首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Huxtable package for R:输出到Word时如何正确引用bookdown中的Huxtable

Huxtable package for R:输出到Word时如何正确引用bookdown中的Huxtable
EN

Stack Overflow用户
提问于 2020-08-06 00:41:19
回答 1查看 33关注 0票数 0

Using the example here,我能够创建一个表,并引用它使用huxtable & bookdown,只要我输出到pdf。同样的情况似乎不适用于MS word。

这是我的sessionInfo,如果它有帮助的话:

代码语言:javascript
复制
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6       compiler_3.6.1     pillar_1.4.2       prettyunits_1.0.2 
 [5] tools_3.6.1        digest_0.6.25      packrat_0.5.0      pkgbuild_1.0.6    
 [9] lifecycle_0.2.0    evaluate_0.14      tibble_2.1.3       gtable_0.3.0      
[13] pkgconfig_2.0.3    rlang_0.4.6        cli_2.0.2          rstudioapi_0.11   
[17] parallel_3.6.1     yaml_2.2.0         xfun_0.10          loo_2.1.0         
[21] gridExtra_2.3      dplyr_1.0.0        knitr_1.28         generics_0.0.2    
[25] vctrs_0.3.1        tidyselect_1.1.0   stats4_3.6.1       grid_3.6.1        
[29] glue_1.4.1         inline_0.3.15      R6_2.4.0           processx_3.4.1    
[33] fansi_0.4.0        rmarkdown_2.3      bookdown_0.20      rstan_2.19.2      
[37] purrr_0.3.3        callr_3.4.3        ggplot2_3.3.1      magrittr_1.5      
[41] matrixStats_0.55.0 scales_1.0.0       ps_1.3.0           htmltools_0.4.0   
[45] StanHeaders_2.19.0 assertthat_0.2.1   colorspace_1.4-1   munsell_0.5.0     
[49] crayon_1.3.4 
EN

回答 1

Stack Overflow用户

发布于 2020-08-06 02:06:38

经过额外的搜索,我找到了两个解决方案herehere。最简单的解决方案是使用tab.cap作为块选项:

代码语言:javascript
复制
```{r foo, echo=FALSE, tab.cap="Got it!"}
hux(a = 1:5, b = 1:5)  
```
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63269733

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档