Error in file(file, "rt") : cannot open the connection. In file(file, "rt") : cannot open file 'xxxxx.csv': No such file or directory 해결방법

CODEDRAGON Development/Big Data, R, ...

반응형

 

 

 

오류 메시지

Error in file(file, "rt") : cannot open the connection

In file(file, "rt") : cannot open file 'xxxxx.csv': No such file or directory

> x <- read.csv("b.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") : cannot open file 'b.csv': No such file or directory
>

 

 

 

 

해결방법

작업폴더를 현재 작업공간으로 설정하면 해결됩니다.

 

# 작업폴더 지정

# 경로 설정시 /(슬래시) 구분해야 합니다.

getwd()

setwd("C:/CodeLab/workspace_da")

getwd()

 

 

 

파일이 정상적으로 오픈됩니다.
> x <- read.csv("b.csv")
> x
  X1 codedragon X95
1  2  bufferfly  97
2  3    unicorn  92
>

 

 

 

 

반응형