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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -