my computer can't find my csv file in r -
when try run csv file in rstudio, says
"cannot open file 'bit121gbp.csv': no such file or directory error in file(file, "rt") : cannot open connection"
mydata <- read.csv("bit121gbp.csv", header =true)
should download different place, because right it's on desktop, or should change code?
there 3 ways can read file.
for example, have downloaded in desktop (example mac) then
first: provide full path
mydata <- read.csv("/users/test/desktop/bit121gbp.csv", header =true)
second: provide relative path
mydata <- read.csv("~/desktop/bit121gbp.csv", header =true)
third: set path
setwd("~/desktop") mydata <- read.csv("bit121gbp.csv", header =true)
Comments
Post a Comment