O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

To generate reports using rmarkdown and knitr, follow these steps:

  1. Open RStudio.
  2. Create a new R Markdown document as follows:
    1. Select the menu option by navigating to File | New File | R Markdown.
    2. Enter the title as Introduction, leave the other defaults as is, and click on OK.

This generates a sample R Markdown document that we can edit to suit our needs. The sample document resembles the following screenshot:

  1. Take a quick look at the document. You do not need to understand everything in it. In this step, we are just trying to get an overview.
  2. Generate an HTML document based on the markdown file. Depending on the width ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required