针织衫:仅显示结果,不显示其他任何内容 [英] Knitr: Only show result without anything else

查看:102
本文介绍了针织衫:仅显示结果,不显示其他任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法弄清楚.

在带有rhtml文件的R Studio中,我想要这样:

in R Studio with an rhtml file, I want this:

<!--begin.rcode test <-1  end.rcode-->

在html输出中看起来像这样:

To look like this in the html output:

1

但是它目前看起来像这样:

But it currently looks like this:

## [1] 1

基本上希望以此为基础构建一个html页面..因此,必须排除所有由knitr表示法产生的额外div和代码.

Basically looking to build an html page around this.. So all the extra divs and code generated by the knitr notation need to be excluded.

在这上面敲我的头.

推荐答案

  • echo控制代码的显示
  • results控制代码评估的输出
  • message控制消息
  • warningerror控制代码评估中的警告和错误.

    • echo controls the display of code
    • results controls the output of the code evaluations
    • message controls the messages
    • warning and error controls warnings and errors from the code evaluations.

      ```{r echo = FALSE, results = TRUE, message = FALSE, warning = FALSE, error = FALSE}
      
          # some code
      
      ```
      

    • 这篇关于针织衫:仅显示结果,不显示其他任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆