0

Using the example here, I am able to create a table & reference it using huxtable & bookdown as long as I output to pdf. The same does not seem to work with MS word.

Here is my sessionInfo in case it helps:

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 

 
ECOSTATS
  • 140
  • 6

1 Answers1

2

After additional searching, I found two solutions here and here. The easiest solution is to use tab.cap as a chunk option:

```{r foo, echo=FALSE, tab.cap="Got it!"}
hux(a = 1:5, b = 1:5)  
```
ECOSTATS
  • 140
  • 6