I am having trouble opening up a csv file in RStudio. I am unable to run lines 20 and 22 but it seams as though the path is correct. I am working on a mac.
Thank you
I am having trouble opening up a csv file in RStudio. I am unable to run lines 20 and 22 but it seams as though the path is correct. I am working on a mac.
Thank you
Can you provide a reprex ?
The only thing we can say here is that there is something wrong with file. R can't access it to read it.
Does it exist in this folder ?
Have you the right to read it ?
Is there a typo in the filename ?
I am going through a tutorial on R for beginners. Initially the tutorial came with a set of example files in a folder. I am learning how to read data from a spreadsheet in RStudio. I was given a .xlsx file of a data set and then converted it into a csv comma delimited file and then re-saved it on my desktop. I then tried creating the sn.csv data frame that then has read.csv that reads my new csv file on my desktop but I am unable to specify the path which to read the desired csv file which is still on my desktop. I hope this helps.
I think you could learn to use RStudio Projects and how to read data from there. I could help to not deal with absolute path.
The other webinars are useful too.
Your R code seems ok. the error means the file path provided is not readable. I can't do much more here.
Thank you! It seams as though the pathway sn.csv <- read.csv("Desktop/social_network.csv") worked instead.
Good to know !
it is possible as I suspected that the space in the path was not understood correctly.
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 21 days after the last reply. New replies are no longer allowed.