The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

R studio

R studio

0
Votes
1
Answer

HELLO,
I  am unable to insert/import  csv/excel file in R studio. Please tell me how to import that file in detail.I have already tried many codes but it couldn’t work. i have installed all the necessary packages which are mentioned in the video.

Start your code here
s <- read.csv("C:/Users/hp/Documents/Data Science/365 Data Science/Data Visualisation/bar_chart_data")

and it’s showing error :
Error in file(file, “rt”) : cannot open the connection
In addition: Warning message:
In file(file, “rt”) :
cannot open file ‘C:/Users/hp/Documents/Data Science/365 Data Science/Data Visualisation/bar_chart_data’: No such file or directory

Please help with this problem. The file directory is correct *.

1 Answer

365 Team
0
Votes

Hi omkar, 
thanks for reaching out! To read the file in R and Python, you need to include the file extension when specifying the path. For a csv file, you should add .csv, for an excel file .xslx and so on. 
So, in your code it should be:

s <- read.csv("C:/Users/hp/Documents/Data Science/365 Data Science/Data Visualisation/bar_chart_data.csv")

Best,
365 Eli