From the course: R for Data Science: Analysis and Visualization
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Entering data - R Tutorial
From the course: R for Data Science: Analysis and Visualization
Entering data
- [Instructor] Obviously, the reason you started working with RStudio is because you want to get some insights from data but you first have to get your data into R. And the easiest way to do that, meaning the one that has the fewest steps is doing it manually, which works for very small amounts of data. But let me show you some of how this works. To do this, I'm using the file 02_05_EnteringData.R. Now, R can do a lot of things pretty easily. One is it can do basic math. I just wrote two plus two here and then I press Command + Enter if you're on a Mac or Control + Enter if you're on a pc. And what you see down here is it repeats the command two plus two along with the comment that I put next to it. Then it gives the result four. Now, this thing right here next to it, the one is square brackets, that's an index number. If we had several different numbers and if it went to more than one line, you would see different…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Installing R3m 30s
-
(Locked)
Environments for R2m 54s
-
(Locked)
Installing RStudio1m 9s
-
(Locked)
Navigating the RStudio environment8m 17s
-
(Locked)
Entering data7m 2s
-
(Locked)
Data types and structures10m 35s
-
(Locked)
Comments and headers5m 59s
-
(Locked)
Packages for R4m 18s
-
(Locked)
The tidyverse5m 38s
-
(Locked)
Piping commands with |4m 42s
-
(Locked)
Sample datasets4m 35s
-
(Locked)
Importing data from a spreadsheet5m 24s
-
-
-
-
-