Learn R From ZERO — Ep. 12: Importing Data in R (Mac + Windows)
Stats with Aaheli
0:00 / 0:00
Learn R From ZERO — Ep. 12: Importing Data in R (Mac + Windows)
101 просмотр · 7 дн. назад
Stats with Aaheli
461 подписчик
101 просмотр · 7 дн. назад
Episode 12, and this is the episode where R stops being a practice space and starts being an actual tool. Every dataset you'll ever really work with starts outside R — this is how you get it in.
This episode covers:
🔹 Building data directly with c() — quick, but doesn't scale
🔹 Using dataframes, plus edit() for manual spreadsheet-style data entry
🔹 Importing from a text file with read.table() — and how to do this on Mac, since Notepad doesn't exist there
🔹 Importing from a CSV file with read.csv() — no extra package needed
🔹 A couple of Mac-specific notes along the way, since I record on Mac and a couple of steps look slightly different than on Windows
00:00 – Introduction | Importing Data into R
00:26 – Why Importing Data Matters
02:20 – Method 1: Creating Vectors in R
03:13 – Method 2: Creating Data Frames Using `data.frame()`
03:29 – The `edit()` Function: Entering Data Like a Spreadsheet
04:05 – Mac vs. Windows: Setting Up the `edit()` Function
04:45 – Example: Creating a Data Frame with `edit()`
05:43 – Entering Names and Cities into a Data Frame
06:43 – Viewing the Imported Data in R
07:20 – Limitations of the `edit()` Function
08:09 – Method 3: Importing Data from a Text File
08:17 – Creating a Text File in RStudio (Mac and Windows)
09:24 – Example: Preparing Tab-Separated Data
10:05 – Saving and Importing a `.txt` File Using `read.table()`
10:42 – Understanding `header = TRUE`
11:00 – Selecting and Importing a Text File
11:40 – Fixing the Text File Import Issue
12:03 – Viewing Imported Text Data in R
12:28 – Importing Text Files on Windows and Mac
13:20 – `header = TRUE` vs. `header = FALSE`
13:59 – Example: Importing Data Without Column Headers
14:24 – Method 4: Importing CSV Files into R
14:34 – What Is a CSV File?
14:51 – Creating and Saving a CSV File Correctly
15:48 – Importing CSV Files Using `read.csv()`
16:03 – Understanding the `read.csv()` Syntax
16:40 – Example: Importing Student Data from a CSV File
16:58 – `read.csv()` vs. `read.table()`
17:09 – Episode 12 Recap: Four Ways to Import Data into R
17:31 – Importing Text Files Using `read.table()`
17:48 – Importing CSV Files Using `read.csv()`
18:07 – Like, Subscribe & Outro
Mac users: if edit() asks you to install something the first time, that's XQuartz — a free, one-time official download: https://www.xquartz.org/
No prior coding background needed — just pick up where Episode 11 left off.
📌 New here? I'm Aaheli, a stats & data science student sharing everything I'm learning in R, one video at a time.