readr file errors

Hi y'all,

I'm very new to R & very scared of syntax error frustration (it made me give up on Python before).
I'm following a tutorial on using readr to open an already uploaded dataset (called mtcars).
I tried using readr_example & read_csv (& read_csv Idk the difference tbh) but I keep getting the following errors:

readr_example("mtcars")
Error in system.file("extdata", file, package = "readr", mustWork = TRUE) :
no file found

read_csv("mtcars")
Error: 'mtcars' does not exist in current working directory ('/cloud/project').

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

the file is not called mtcars, its called mtcars.csv
you can see the readr_example files by calling readr_example without parameters

readr_example()

it still doesn't work as mtcars.csv

Try it in readr_example that will be there by virtue of you using readr.
For read_csv to work, you would have had to take steps to place the csv in your cloud, and i dont know that youve done so.
To see if you have any files loaded you can list your files.

list.files()

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.