top of page
If you are using R on a Mac, you have two options to read your data.
​
First, you can create the statlab folder on your desktop and copy the data into that folder. Then you will use the following pathway to read the data.
​
library(readxl)
four<-read_excel("~/Desktop/statlab/classdataS20.xlsx")
​
The second option, is to demonstrated in the video called "Importing data in R using a Mac". Starting at the 4 minute and 10 second point, the video shows you how to read data (and find data) on a Mac. The pathway that was used in the video goes through...
​
library(readxl)
four<-read_excel("/Users/Username/Downloads/classdataS20.xlsx") 
​
In this case, you simply download the data that you are going to read and it will automatically be placed in the Downloads folder on your Mac. The video also shows you how to find files on your Mac.
​
Please also include this line:
​
#classdataS20 <- read_excel("C:/statlab/classdatas20.xlsx")
​
It won't import the data on a Mac, but it will on a Windows machine, which is what is used for grading. The hashtag will keep it from running on your machine.
bottom of page