From the course: R Essential Training: Wrangling and Visualizing Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Entering data
From the course: R Essential Training: Wrangling and Visualizing Data
Entering data
- [Instructor] By far the easiest way to get a dataset of any meaningful size into R is to import it and I'm going to talk about that but I want to show you first how, for very small sets of data, for a particular variable or a particular calculation, it may be easiest to enter the data directly into R through the script window. Let me show you how this works. I'm going to use this script about entering data and let's come down to this first basic command. You can do basic math. Here I have two plus two. And to run that command, I'm going to hold down Command or Control and hit the Enter or Return key. When I do that, I get the result down here in the console. Now, the one in square brackets is not the result. That's an index number and that's there because R puts the results into vectors and it's telling you which item is the first one in that line. Now, there's only one so we just have the index number one.…
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 R1m 25s
-
(Locked)
Environments for R3m 31s
-
(Locked)
Installing RStudio1m 17s
-
(Locked)
Navigating the RStudio environment6m 4s
-
(Locked)
Entering data7m 5s
-
(Locked)
Data types and structures12m 24s
-
(Locked)
Comments and headers4m 59s
-
(Locked)
Packages for R4m 46s
-
(Locked)
The tidyverse3m 4s
-
(Locked)
Piping commands with %>%4m 33s
-
-
-
-
-
-