Here are some miscellaneous tips for working on RStudio and writing R Markdown file. It will be updated from time to time.
1.1 Re-view generated html file in RStudio
If need to view closed html result file, simply run:
2. R Markdown
2.1 Show code but not run
eval=FALSE in chunk option.
2.2 Output data frames as tables
data <- faithful[1:4,] knitr::kable(data, caption = "Table with kable")
For a nice-looking table, the package htmlTable what you need.
library(htmlTalble) htmlTable(data, caption = "Table with htmlTable")