How to start with R markdown in r software

Steps:

****Ensure internet connection is on before you start Markdown for first time as it will install some dependencies.

  1. Click the red circled on the left top corner in R-studio

  2.      

  3. Following are the dropdown options:
    Second option is R-markdown.

  4.        

  5. If you click R Markdown , it will open a install box , click yes to install the dependencies.

  6. Your rmarkdown is installed and this window will open. Put some title(as I have put Vinod Sir) ,author you can leave it blank and by default it is saved in html format, you can change it to word doc or pdf as the options are available below. Then click ok.
    OR
    IF the r markdown is doesn’t open up automatically then just go to 1st step to open rmarkdown.

  7.      

  8. Then your rmarkdown script opens up with lot of writings.
    You can delete everything from step 6.

  9.      

  10. This is how it should look after deleting all unnecessary things.

  11.     

  12. Next go to option insert at right corner marked in red circle below and select r.

  13.     

  14. Once you have selected r in insert option this is how it should look below.

  15.     

  16. In the above picture you can see the r written within curly braces. There is a grey line. One has to write the code in between. Suppose you want to print summary of iris dataset. This is how it should look in below pic.

  17.     

  18. The code has to written within dotted lines. As you can see above. Once you have written the code, then just click knit(red circle in the above pic), it will ask to save the doc and automatically it will run it. This is how it looks at the end with output pic below.

  19.