How to show code but hide output in RMarkdown?

前端 未结 6 563
生来不讨喜
生来不讨喜 2020-12-13 01:58

I want my html file to show the code, but not the output of this chunk:

```{r echo=True, include=FALSE}
fun <- function(b)
    {
    for(a in b)
        {         


        
6条回答
  •  感动是毒
    2020-12-13 02:49

    The results = 'hide' option doesn't prevent other messages to be printed. To hide them, the following options are useful:

    • {r, error=FALSE}
    • {r, warning=FALSE}
    • {r, message=FALSE}

    In every case, the corresponding warning, error or message will be printed to the console instead.

提交回复
热议问题