Search code examples
rmacoscsvimport-csv

google capstone data file import from mac desktop issue


I am very new to programming and am working on the Google Data Analytics Certificate. I have looked everywhere for assistance to my issue and nothing has worked. (I have watched videos, searched stack overflow, queried kaggle, etc.)

I am working on the bellabeat capstone project and have been able to download the data files to my mac desktop.

My issue is that I am unable to import these data files into r, which I am running locally on my machine.

Based on the breadcrumb trail of where my files are located, I have been trying to run this code:

dailyActivity_merged <- read.csv(~"⁨Macintosh HD⁩/Users/.../googlecapstone_bellabeat_data/Fitabase_Data_20160412to20160512/dailyActivity_merged.csv")

I have received this error:

Error: bidi formatting not allowed (line 1), use escapes instead (\u2068)

Based on the "escapes" reference in the error statement, I have tried to change "/" to this "" and that hasn't worked.

Could someone please point me in the direction for a solution? If there are tutors available somewhere, I would be interested in hearing about that as well.

Thanks in advance for your attention.

RB


Solution

  • Not sure if you need to explicitly define the file location for your project, but I usually don't. I use the following code to import files

    dailyActivity_merged = read.csv(file.choose(),header = TRUE)
    

    do not include anything in the parenthesis. You want to copy this line of code exactly.