Meesha Meesha - 7 months ago 39
R Question

Reading a file on a network in R

I am importing a csv file in to R using the read.csv method but get the following error.

The network path is "\\shared\data\abc.csv"


If I use copy paste the address in the address bar in the file explorer, it opens the file but R somehow cannot read it. What's the reason? Is it because the network name starts with "//" instead of traditional drive name like C,D etc?


You need to escape each backslash, so for the double backslash you need four backslashes, i.e.