Lesson 7 of 16 • 3 upvotes • 11:32mins
In this lesson, we'll see how to extract elements from a vector based on some conditions that we specify. For example, we may only be interested in the first 20 elements of a vector, or only the elements that are not NA, or only those that are positive or correspond to a specific variable of interest. By the end of this lesson, you'll know how to handle each of these scenarios.
16 lessons • 2h 20m
Course Overview
2:34mins
Basic Building Blocks
9:44mins
Workspace and Files
8:23mins
Sequences and Numbers
6:12mins
Vectors
9:53mins
Missing Values
5:35mins
Subsetting Vectors
11:32mins
Matrices and Data Frames
8:19mins
Logic
9:39mins
Functions
11:36mins
Lapply and Sapply
9:05mins
Vapply and Tapply
9:08mins
Looking at Data
9:20mins
Simulation
9:49mins
Date and Time in R
8:31mins
Base Graphics
10:57mins