RMarkdown内联表

时间:2019-02-21 15:38:43

标签: r rstudio r-markdown knitr

我正在RMarkdown上工作,当我内联打印dfs(在编织后不在RStudio内)时,它们的打印方式如下

dfs now

之前,dfs将打印为如下所示的漂亮分页表:

dfs before

我不知道我要寻找什么设置,在哪里或如何更改它。我怎么回去?

我最近更新了R,现在正在研究:

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.3


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

other attached packages:
 [1] DT_0.5           bindrcpp_0.2.2   ggthemes_4.0.1   cowplot_0.9.3    lavaan_0.6-3     ggplot2_3.1.0    pwr_1.2-2       
 [8] knitr_1.21       kableExtra_0.9.0 effsize_0.7.1    magrittr_1.5     dplyr_0.7.8      tidyr_0.8.2      readr_1.3.0     
[15] lmerTest_3.0-1   lme4_1.1-19      Matrix_1.2-14   

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5      xfun_0.4              purrr_0.2.5           splines_3.5.1         lattice_0.20-35      
 [6] colorspace_1.3-2      stats4_3.5.1          htmltools_0.3.6       viridisLite_0.3.0     yaml_2.2.0           
[11] rlang_0.3.0.1         nloptr_1.2.1          pillar_1.3.1          withr_2.1.2           glue_1.3.0           
[16] RColorBrewer_1.1-2    flexdashboard_0.5.1.1 bindr_0.1.1           plyr_1.8.4            stringr_1.3.1        
[21] munsell_0.5.0         gtable_0.2.0          rvest_0.3.2           htmlwidgets_1.3       evaluate_0.12        
[26] labeling_0.3          highr_0.7             Rcpp_1.0.0            scales_1.0.0          jsonlite_1.6         
[31] mnormt_1.5-5          hms_0.4.2             digest_0.6.18         stringi_1.2.4         numDeriv_2016.8-1    
[36] grid_3.5.1            tools_3.5.1           lazyeval_0.2.1        tibble_1.4.2          pbivnorm_0.6.0       
[41] crayon_1.3.4          pkgconfig_2.0.2       MASS_7.3-50           xml2_1.2.0            assertthat_0.2.0     
[46] minqa_1.2.4           rmarkdown_1.11        httr_1.4.0            rstudioapi_0.8        boot_1.3-20          
[51] R6_2.3.0              nlme_3.1-137          compiler_3.5.1     

1 个答案:

答案 0 :(得分:0)

我弄清楚了,想记录下来,以防有人遇到此问题。这是由于在RStudio的最新版本中已修复的错误所致。您可以learn more about the bugdownload the latest version of RStudio来解决问题。