Hi,
You need to set these options in an earlier chunk. When you set them
in the current chunk, it is too late.
Regards,
Yihui
--
Yihui Xie <
xiey...@gmail.com>
Phone:
515-294-2465 Web:
http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Fri, Jun 7, 2013 at 7:00 AM, Karl Sinn <
karl...@gmail.com> wrote:
> Hi,
>
> I'm a total beginner with knitr and I'm hitting some problems I can't solve:
>
> That's my *.Rmd file:
> -----begin
> Achtsamkeit und Intergruppenangst
> ========================================================
>
> This is an R Markdown document. Markdown is a simple formatting syntax for
> authoring web pages (click the **MD** toolbar button for help on Markdown).
>
> When you click the **Knit HTML** button a web page will be generated that
> includes both content as well as the output of any embedded R code chunks
> within the document. You can embed an R code chunk like this:
>
>
> ```{r}
> opts_chunk$set(comment="test",results="hide",warning=FALSE,error=FALSE,message=FALSE)
> source("Vorbereitungen.R")
> source("Analysen.R")
> ```
> -----end
>
> As you can see, I tried to turn off all the warnings, messages and errors. I
> tried to set the comment option to "test".
> But as you can see in the following *.md file, that was created using
> RStudio, the options are simply ignored.
>
> How can I switch off the output of for example loaded libraries?
> Thanks
> Karl
>
> *.md document:
> -----begin
> Achtsamkeit und Intergruppenangst
> ========================================================
>
> This is an R Markdown document. Markdown is a simple formatting syntax for
> authoring web pages (click the **MD** toolbar button for help on Markdown).
>
> When you click the **Knit HTML** button a web page will be generated that
> includes both content as well as the output of any embedded R code chunks
> within the document. You can embed an R code chunk like this:
>
>
>
> ```r
> opts_chunk$set(comment = "test", results = "hide", warning = FALSE, error =
> FALSE,
> message = FALSE)
> source("Vorbereitungen.R")
> ```
>
> ```
> ## Loading required package: MASS
> ```
>
> ```
> ## Loading required package: boot
> ```
>
> ```
> ## Attaching package: 'boot'
> ```
>
> ```
> ## The following object(s) are masked from 'package:psych':
> ##
> ## logit
> ```
>
> ```
> ## Loading required package: mnormt
> ```
>
> ```
> ## Loading required package: pbivnorm
> ```
>
> ```
> ## Loading required package: quadprog
> ```
>
> ```
> ## This is lavaan 0.5-12
> ```
>
> ```
> ## lavaan is BETA software! Please report any bugs.
> ```
>
> ```
> ## Duplikate, Vpn_CODE: VORSICHT damit muss man noch umgehen
> ```
>
> ```
> ## Error: Objekt 'stichprobe' nicht gefunden
> ```
>
> ```r
> source("Analysen.R")
> ```
>
> ```
> ## Error: Fehler bei der Auswertung des Argumentes 'object' bei der
> ## Methodenauswahl für Funktion 'summary': Fehler in eval(expr, envir,
> ## enclos) : Objekt 'skala.stadis' nicht gefunden Calls: aov ... eval ->
> ## model.frame -> model.frame.default -> eval -> eval
> ```
> -----end
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "knitr" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
knitr+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>