R Markdown is one of the most popular data science tools and is used to save and execute code, create exceptional reports whice are easily shareable.
The documents that R Markdown provides are fully reproducible and support a wide variety of static and dynamic output formats.
Using markdown syntax, which provides an easy way of creating documents that can be converted to many other file types, while embeding R code in the report, so it is not necessary to keep the report and R script separately. Furthermore The report is written as normal text, so knowledge of HTML is not required. Of course no additional files are needed because everything is incorporated in the HTML file.
Before proceeding, please follow our short tutorial.
Look at the examples given and try to understand the logic behind them. Then try to solve the exercises below using R and without looking at the answers. Then check the solutions.
to check your answers.
Create a new R Markdown file (.Rmd) in RStudio.
Insert a YAML Header with title, author and date of your choice at the top of your .Rmd script.
Display the summary of “cars” dataset in your report. HINT: Use
Make a plot of the “cars” dataset under the summary you just created. HINT: Use
Create a small experimental dataframe and dipslay it in your report. HINT: Use
Hide the code from your report. HINT: Use
Load the package “knitr” in your .Rmd file. and hide the code chunk. HINT: Use
Hide the warning message that appeared in your report. HINT: Use
fig.height of your plot to 5.
Change the file format of your plot from .png to .svg. HINT: Use