R即使位於正確的目錄中也無法找到文件


0

我對我要進行的有關健康學生研究的項目有疑問。儘管已將所有文件轉換為csv並位於正確的文件夾中,但是我無法通過read.csv或read.csv2導入csv文件。以下是命令行:

setwd ("C:/Users/fek/Desktop/Analyse i-Share")
getwd()
TA<-read.csv2(file=Biobanque.csv, header=TRUE, sep=",", dec=",", fill=TRUE)

這是控制台窗口中的結果:

setwd ("C:/Users/fek/Desktop/Analyse i-Share")

getwd()

[1]" C:/用戶/ fek /桌面/分析i共享"

TA<-read.csv2(file=Biobanque.csv, header=TRUE, sep=",", dec=",", fill=TRUE)

[1] read.table中的錯誤(文件=文件,標頭=標頭,sep = sep,引用=引用,:可以使用objet'Biobanque.csv'

要翻譯成法語,它說找不到文件!

4

The problem is just what it says. By omitting the quotes around "Biobanque.csv", R thinks you are talking about an object whose name is Biobanque.csv. And R is confused because of course you have not created an object by that name.