DiamondJoe12
DiamondJoe12

Reputation: 1817

How to add a line break in Rmarkdown code?

I have an rmarkdown document with this:

`r {"### MyHeading"}`

I would like to add a line break after this (no text, just an empty line). How can I accomplish this by just editing the existing block of code and not adding another? i.e. is there something like this:

`r {"### MyHeading"} `

This fails and says object 'nbsp' not found.

Upvotes: 0

Views: 1345

Answers (1)

adelriosantiago
adelriosantiago

Reputation: 8134

Use <br/>'s inside the Markdown/HTML block:

`r {"### MyHeading<br/><br/><br/>"}`

enter image description here

Note that the &nbsp; you were adding was outside, not inside the double quotes.

Upvotes: 2

Related Questions