Skip to Main Content

R Studio Basics for Data Visualization: Import the Data into R Studio

For the R Studio Data Visualizaton Workshops, November 2018

Steps for importing data to RStudio

From a saved .csv:

1. Save the .csv file of the dataset to your computer.

2. In RStudio Cloud, click on Upload and choose the file from your computer.

3. Type this code in the console: ({data_name} <-read_csv("filename.csv"))


Example: (Doggies <- read_csv("Dog_Names.csv"))


From a file at a url:

1. Type into the console: download.file({fileURL}, {FileName})


2. Set the name of the dataset like we did above:

({nameFile} <- read_csv ("{filename.csv}")