Adding a file to your R notebook is a simple 2 step process.
1. “Import” file to notebook session.
This makes sure your dataset is isolated in one state so that it doesn’t change as you analyze it. Remember, you can always load the latest content if you choose to later on.
To import the file, click on the “Load Files” button in your notebook. That will list all the files available for import from your current project.
Click on the button next to the file (on the left). Once it’s loaded into the notebook session, the button will turn green.
2. Reading the file.
We can now read the CSV dataset using the read.csv() function that comes with R.
And that’s it! The head() function allows you to see the first few lines of the dataset. That way we can check if it has been loaded. You can now use the dataset variable to access the entire CSV dataset.
All files from this post are located here so you can copy them and run again: https://www.datazar.com/project/p820a77e6-1555-4549-8a6f-96ca99c29ff8/files