Open the Viewer

Using a viewer to see the output of the codes

Once your file has been compiled the popup status window should look like this. Click the View link to go to the viewer to see the output. You can also click on the number in the right portion of the [Save Version] button. If you get an error message, make sure your RMarkdown runs without errors in your RStudio environment. If that’s the case, make sure that you have all the files that your script relies on the present in the “../input” directory, and that all pathnames in your script refer to the correct location.

For instance, make sure you use,

--> mydat <- read_csv("../input/mydata.csv")

and not for example

--> mydat <- read_csv("C:\\Users\\Desktop\\Datamydata.csv")

Run R Markdown in kaggle

Kaggle allows you to compile your RMarkdown files, as developed in RStudio for example, into a report on Kaggle. This very instruction was made in RMarkdown. Below the steps to do this with your RMarkdown file are detailed.

Similar Reads

Create a New Notebook

Create a New Notebook...

Set the Language to R

Select the R Language as the backend Kernel...

Change the Editor Type in the File Menu

Using the Notebook option in the Editor...

Change the Language in Settings

Selecting R Markdown Notebook...

Copy the RMarkdown code

...

Paste the code into Kaggle

Writing code in the R Markdown Notebook...

Save & Run All (Commit)

Saving a R Markdown Notebook...

Open the Viewer

Using a viewer to see the output of the codes...

Verify the output and share the URL

Sharing the R Markdown Notebook...