Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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.
Exercise 1
Make a table out of the object dataframe you created and set its numbers to have one significant figure. HINT: Use kable()
.
Exercise 2
Use bold text for your report’s title. HINT: Use ** **
.
Exercise 3
Use Italic text for the author’s name. HINT: Use * *
.
- Build a complete workflow in R for your data science problem
- Get indepth on how to report your results in a interactive way
- And much more
Exercise 4
Add “Summary” as Header of size 1 above your summary context.
Exercise 5
Add “Plot”, “Dataframe” and “Table 1” as Headers of size 3 above the rest of the three objects of your report respectively.
Exercise 6
Create manually a small table for your dataframe.
Exercise 7
Apply right alignment to the column “B”.
Exercise 8
Create an unordered list of the contents of column “A” of your dataframe.
Exercise 9
Transform the list you just created to ordered.
Exercise 10
Add a link named “Link” that leads to “www.r-exercises.com”.
Related exercise sets:
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.