Cannot open the file

###*Regression and Stepwise Regression
rm(list=ls())
getwd()
holder<-"C:/Users/a0966/Documents"
setwd(holder)
df<-read.csv('887.csv',header=TRUE,sep=",")

Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") : cannot open file '887.csv': No such file or directory

It seems the file c:\Users\a0996\Documents\887.csv does not exist. Do you see it if you run

dir()

It still can not open

Does the output of the dir() function show the file 887.csv?

oh it showed 877, and i changed the code , but it shows
Error in make.names(col.names, unique = TRUE) :
invalid multibyte string at 'Ҩ'
螢幕擷取畫面 2022-12-09 040228

There is a character in the column names that is causing a problem. Can you edit the csv file in a text editor (e.g. Notepad) and reenter the column names?

thanks , I Solved it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.