简体   繁体   中英

R Markdown: knitr option results='hide' not working

I'm trying to produce a chunk code that executes and shows the code but hides the output. I know that the way to do it is by adding echo = T, results = 'hide' in knitr chunk options, as suggested here . However, in my case, this still produces the output, any ideas why?

在此处输入图片说明

My session info:

> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

loaded via a namespace (and not attached):
 [1] compiler_3.4.3  backports_1.1.2 rprojroot_1.3-2 htmltools_0.3.6
 [5] tools_3.4.3     yaml_2.2.0      Rcpp_0.12.19    rmarkdown_1.10 
 [9] knitr_1.20      digest_0.6.18   evaluate_0.12  

可以使用fig.keep = 'none'选项来抑制fig.keep = 'none'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM