iago
iago

Reputation: 3256

How can I make Rmarkdown formatting of chunks comply with break lines?

If I have a chunk like

niris <- iris %>%
  select(starts_with("Sepal"))

The knitr output of the chunk is

niris <- iris %>% select(starts_with("Sepal"))

But I would like it complies with the break lines of my code so it is printed in html as I print in code . I was looking at R Markdown reference guide and at Yihui web and trying multiple options from Results and Code decoration and I couldn't get my goal.

Do you know how should I do?

Thank you!

Upvotes: 0

Views: 132

Answers (1)

Yihui Xie
Yihui Xie

Reputation: 30104

You didn't provide a reproducible example, so I can only guess. You probably turned on the tidy option (i.e., you used the chunk option tidy = TRUE). If you did that, either set tidy = FALSE or just leave out tidy = TRUE since tidy = FALSE is the default.

Upvotes: 1

Related Questions