R is a statistical programming language. Developed by statisticians Ross Ihaka and Robert Gentleman, R is one of the most popular programming languages in the industry. It is used in almost everywhere, ranging from finance and banking to medicine and manufacturing. It can be used in disciplines like statistics, computer science, economics and economic modelling, cyber security, information systems, health care, engineering and so on.
To update R, run the following code.
R Markdown is a file format for creating dynamic documents with R and RStudio. RMarkdown documents are written in Markdown which has easy-to-write plain text format with embedded R code.
In order to create a Rmarkdown document, we click File and then find New File, R markdown …, and Document. There are three options:
Â
In the following, we show an example of the header of a R markdown file.
We can use the output option to manipulate which document we would like to have.
To render a R Markdown document into its final output format, we can click the Knit button to render the document in RStudio and RStudio will show a preview of it. The corresponding output file is saved in the folder where the markdown file is.
The further settings for presentations could be found at R Markdown Cookbook and R Markdown: The Definitive Guide.
See Mac keyboard shortcuts for more detail.
?data.frame etc.You can utilize the following single character keyboard shortcuts to enable alternate display modes (Xie, Allaire, and Grolemund (2018)):
A: Switches show of current versus all slides (helpful for printing all pages)
B: Make fonts large
c: Show table of contents
S: Make fonts smaller