Issues with the read_csv code in R - google certificate capstone

I am stuck at the position of my project under "load data set" under process.

I am trying to process the files that were given to me as zip files which I have downloaded and unzipped. After that, I uploaded them to the files section (bottom right) of RStudio in the project tab. Yesterday after I tried to run my code the error that showed was:
"/bin/sh: 1: install.packages("tidyverse"): not found"
Today it was: " [image] Show Traceback

Error: '202012-divvy-tripdata.csv' does not exist in current working directory ('/cloud/project')."

The code I ran was: {r}
month1 <- read_csv("202012-divvy-tripdata.csv") as well as {r}
month1 <- read_csv("project/tripdata/202012-divvy-tripdata.csv")

Please help to move on from this step of my project!

Hi, try to press with ypur mouse with the left button and then copy the location of the file like this example:
read_csv(desktop\myfolder\myfile)

Click on the Files tab.

Do you see a folder named tripdata in the list? If so, click on its name to open the folder.

Is there a file named 202012-divvy-tripdata.csv in the folder? If so, you can click on the two dots to the right of the upward green arrow to return to the parent directory /cloud/project.

If everything is where it should be then try:

read_csv("tripdata/202012-divvy-tripdata.csv")

Hello, I have tried this, but this did not work for me either.

Thank you for your reply!

Hello,

This did work! Thank you so much!

For anyone who does still have issues, when I first tried to run this it was giving me "could not find function read_csv". So then I did "install.packages(readr)" -> "library(reader)" then ran the code " month1 <- read_csv("tripdata/202012-divvy-tripdata.csv")"

This then allowed the code to run properly.

This topic was automatically closed 7 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.