Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
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

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)

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...