There are numerous ways to get data into R. Here, I will go over getting a .csv into RStudio. If you have RStudio on your own computer, skip straight to step 2.
Open up RStudio, in the Files tab, click Upload, and choose your csv file.
In RStudio, click on the Workspace tab, and then on “Import Dataset” -> “From text file”. A file browser will open up, locate the .csv file and click Open. You’ll see a dialog that gives you a few options on the import. Of particular importance is making sure if you have column names in your file, that Header is set to “Yes”. The column names should be bolded in the Data Frame box. Click “Import”.
RStudio will now run some R code to import your data. For this fake file, I see :
homework_5 <- read.csv("/nfs/chernobyl/u2/w/wickhamc/homework_5.csv")
Now my data is in the data.frame called homework_5
and I can operate on it as usual.
qplot(Group, Response, data = homework_5)