Home Comments Thread
New Thread

[knitr] Objects: Objects to manipulate options, patterns and hooks | /knitr/objects/

yihui yihui 2022-12-16 23:02:16

Objects: Objects to manipulate options, patterns and hooks

https://yihui.org/knitr/objects/

4 Comments

giscus-bot giscus-bot 2022-12-16 23:02:17
Guest *Robert Forum* @ 2012-11-25 13:39:49 originally posted:

First of all, wonderful package - thank you for your work Yihui.
But could you tell me how to set global options in .Rmd document. Simple example:

x <- rnorm(10)  
x  

I do not set comment in every chunk. How to change the default ## into >?

Robert

yihui yihui 2022-12-16 23:02:19

That setting sounds unusual... Anyway, use opts_chunk$set(comment = '>') if you really like the output has a prefix >. I suppose you probably want opts_chunk$set(prompt = TRUE), though.

Originally posted on 2012-11-25 19:48:15

giscus-bot giscus-bot 2022-12-16 23:02:17
Guest *Guest* @ 2013-08-20 17:24:19 originally posted:

Thanks for the great package Yihui.

I've worked through several examples, but can't seem to get the images to display in the tufte-book class, although they compile in their own document environment. The maxwidth var seems to go missing in my child documents with the chunks. I've also tried to define the parent but still no luck.

I see you have worked with the tufte-handout, do you have any suggestions for the book class?

yihui yihui 2022-12-16 23:02:19

Sorry, I guess I cannot help without a minimal reproducible example... in theory, child documents are included in parent documents, so maxwidth must be applied to them.

Originally posted on 2013-08-22 04:22:35

giscus-bot giscus-bot 2022-12-19 06:00:32
Guest *Mario GS* @ 2016-08-22 09:02:21 originally posted:

Dear Yihui Xie, I have been struggling trying to embed a ggvis object into a pdf using knitr. I'm facing difficulties installing vega, I read that it has problems with windows users. Do you know if there is an alternative method do this? Thanks a lot.

zhipengliux zhipengliux 2023-07-16 03:35:23

How to add a "copy to clipboard" buttom in R markdown

Sign in to join the discussion

Sign in with GitHub