Get access to all lessons in this course.
Getting Started With R
Import Data
This lesson is locked
This lesson is called Import Data, part of the Getting Started With R course. This lesson is called Import Data, part of the Getting Started With R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Create a new R script file and save it as
import.R
Add the line
library(tidyverse)
at the top of your R script file and run it to load the tidyverse package.Use the
read_csv()
function (notread.csv()
) to import thepenguins_data.csv
file
You need to be signed-in to comment on this post. Login.
Bhumika Bhattacharya
September 27, 2023
I copied the penguins data into my directory and it is also showing up in the 'files' section in the project but when I am running the code - read_csv("penguins_data.csv"), I am getting this output in the console :(
Bhumika Bhattacharya
September 27, 2023
This comment was supposed to go under "start a new project" my bad
Gracielle Higino
September 27, 2023
Hi Bhumika! It might be that you are not working on the same directory. Can you share on Discord a screenshot of your session? When this happens to me, I usually start running these codes on the terminal, just to quickly check if I'm working in the right place.
You can inspect that using the posit interface too! For example, your working directory will be displayed on your console panel along with your R version.
Let me know if this helps and ping me on Discord to let me know how it went! =D
Libby Heeren
September 28, 2023
I think we got it worked out in office hours! Just needed to have the project open in order for the code to run.