Import csv excel file in R

+1 vote
In file(file, "rt") : 'cannot open file c:/Users/toshıba pc/Desktop/Book1.csv': No such file or directory

Although the syntax looks correct; My R program cannot import .csv file to the R console with a warning

read.table("c:/Users/toshıba pc/Desktop/Book1.csv", header=TRUE, sep=",", row.names="id")
Nov 5, 2018 in Data Analytics by Hannah
• 18,520 points
1,646 views

2 answers to this question.

0 votes

Be sure the file is in the working directory, next, try with read.csv2() function, like this:

df<-read.csv2("File_path.csv",header=T,stringsAsFactors=FALSE, fileEncoding="latin1",sep=";")
answered Nov 5, 2018 by Kalgi
• 52,350 points
0 votes
Hi. Check out your filename and the directory as given in the path as @kalgi said.

Try using read.csv( ) as the file is a CSV file.
answered Aug 23, 2019 by anonymous
• 33,030 points

Related Questions In Data Analytics

0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,920 views
0 votes
1 answer

How can I read a .csv file in R language?

read.csv () function is used to read ...READ MORE

answered Jun 12, 2018 in Data Analytics by zombie
• 3,790 points
748 views
0 votes
1 answer

Load CSV File in R

Loading a .csv file in R is ...READ MORE

answered Jul 28, 2018 in Data Analytics by Sahiti
• 6,370 points
1,008 views
0 votes
1 answer

How can I import a file in R without giving the destination/file path to the specified file?

You can use the window explorer to ...READ MORE

answered Aug 28, 2018 in Data Analytics by Abhi
• 3,720 points

edited Aug 28, 2018 by Vardhan 2,992 views
+1 vote
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
1,812 views
+10 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 9, 2018 in Data Analytics by Abhi
• 3,720 points
1,626 views
0 votes
1 answer

How can I perform word stemming in R

The tm package in R provides the stemDocument() function to stem the ...READ MORE

answered Aug 20, 2018 in Data Analytics by Abhi
• 3,720 points
4,537 views
0 votes
1 answer

How to know the type of an object?

To find the type of an object ...READ MORE

answered Sep 20, 2018 in Data Analytics by Abhi
• 3,720 points
711 views
+1 vote
1 answer
0 votes
1 answer

How do I import document files in R programming

Try the following: read.table("~/SMSSpamCollection", header=TRUE, sep="\t") Change "~/" to the "ptah/to/your/file/" Mess around ...READ MORE

answered Nov 5, 2018 in Data Analytics by Kalgi
• 52,350 points
926 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP