Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in R Programming by (7.3k points)
edited by

I run R on Windows and have a CSV file on the Desktop. I load it as follows,

x<-read.csv("C:\Users\surfcat\Desktop\2006_dissimilarity.csv",header=TRUE)

but the R gives the following error message

Error: '\U' used without hex digits in character string starting "C:\U"

So what's the correct way to load this file. I am using Vista

1 Answer

0 votes
by
edited by

To fix this error, you can either replace all / with // or with \ because using / tries to escape to the next character

x<-read.csv("C:\\Users\\surfcat\\Desktop\\2006_dissimilarity.csv",header=TRUE)

OR

x<-read.csv("C:/Users/surfcat/Desktop/2006_dissimilarity.csv",header=TRUE)

Browse Categories

...