RStudio - Stylling/Formatting

Hi. This is a total beginners question, so please bear with me.
When I run a RMarkdown file in RStudio, the out/display is not nicely formatted, like this
image
But if I knit the file it comes out perfect
image
What is wrong with my RStudio setup and what do I need to include in the post to give more detail.

My biggest issue is that I cannot decifer this warning message and want the formatting to be more readable

I think converting your table into a kable -- though it makes the knitr'd table look nice in html or pdf -- makes the inline table look not so nice.

I wasn't aware of a workaround this, but I'd love to hear a solution if anyone has one.

1 Like

There are probably two problems that are not connected to each other.

First, output in notebook vs html/pdf. It's difficult for me to understand what exactly is the issue. From your example they look identical, but with obvious differences between having one inside of notebook, while second is rendered in HTML with HTML stylings, so that makes sense. knitr::kable() creates a template (you can see what it looks like if you just run knitr::kable(mtcars), for example). How it's rendered is up to environment it is printed at.

Your second issue is not connected, I think, so it would be helpful if you can provide a reprex to see what might be an issue there.

2 Likes

Hi. Thanks for the reply. The "second issue" is not an issue, I just used it as an example of the output format that I get, and that it is difficult to read because I suspect there is something wrong with my RStudio setup. Sorry if that caused confusion.

It is difficult to say if you have issues with setup of package(s) or RStudio from the screenshot above, but if it renders correctly to HTML, then maybe not :slight_smile:

If the issue is formatting then I would say it does exactly what it's supposed to do.

What information can I provide to be able to know if the problem is with my RStudio setup or not.

As I said, if everything works as expected, then probably there is no issue.

If you want to understand 2 parsing failures as in your screenshot, then try to find a reprex that would consistently show this behavior. Then it'll be much easier to see if there is an issue with your RStudio in particular or if there is something else in play.