R markdown code showing output I don't want, how do I remove it?

Viewed 96

Hey guys so I'm just trying things out on sentiment analysis however, when I out put my code on R-markdown after knitting, it's showing me the output which includes my graph and the unwanted output circled in red. I only want the bar graph to show.

Code in rmarkdown

This is the out put I get.

enter image description here

Any ideas how I can fix this?

2 Answers

The output is coming from the call to theme which is separate to your plot as the +-sign is missing after labsand before theme. Add the + and everything will be fine.

you may recognize that the text of the x axis is has no angle of 45

I think you're missing a comma at the top of your code chunk.

Try: {r, echo = FALSE, message = FALSE, warning = FALSE}

Related