can't import data to R studio on MacBook

Hi there,

I was trying to import a csv file to R studio on my macbook pro but R couldn't find the file. Can anyone show me an example of what the file path is like on mac?

1 Like

Check the output of getwd(), this is the current working directory. If the CSV file is not in this directory, then we need to provide the full path.

Now type: mydata <- read.csv(" then press TAB, this will help us auto-populate (auto-complete) the path to the file. Once we have the path and name of the file type ") and run.

1 Like

it works! Thank you so much!

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.