R always creates lists of values—even when there is only one value in a list. These lists are called *vectors* and they make working with data much easier.

- Everything is a vector
- Get to know different data types in R
- Learn how to create vectors
- Use the
`:`

operator to create numeric sequences - Use the concatenate function
`c()`

to create vectors of different data types

```
1:100
c(1, 2, 3, 4)
c("abc", "def", "ghi")
c(TRUE, FALSE, TRUE)
```

View Interactive VersionCombine values into a vector

Save your course progress, collect Recipes and master different Exercises.

- Free Exercises and Quizzes
- Save your course progress
- Learn new skills

2

RecipeIntroduction to VectorsTypes of vectorsQuiz: Data TypesCreating a sequence of numbersExercise: Use the : operatorConcatenating numeric values to a vectorExercise: Concatenate numbersCreating character vectorsExercise: Create a character vectorExercise: Concatenate textCreating logical vectorsExercise: Concatenate logical valuesQuiz: Vectors Recap

4

RecipeUsing R as a pocket calculatorExercise: Use basic arithmeticApplying arithmetic operators on vectorsQuiz: Vector MultiplicationExercise: Multiply numeric vectorsUsing relational operatorsExercise: Compare numeric valuesExercise: Compare temperaturesUsing logical operatorsExercise: Use the & operatorExercise: Use the | operatorUsing the %in% operatorExercise: Use the %in% operator

Save your course progress, collect Recipes and master different Exercises.

- Free Exercises and Quizzes
- Save your course progress
- Learn new skills

2

RecipeIntroduction to VectorsTypes of vectorsQuiz: Data TypesCreating a sequence of numbersExercise: Use the : operatorConcatenating numeric values to a vectorExercise: Concatenate numbersCreating character vectorsExercise: Create a character vectorExercise: Concatenate textCreating logical vectorsExercise: Concatenate logical valuesQuiz: Vectors Recap

4

RecipeUsing R as a pocket calculatorExercise: Use basic arithmeticApplying arithmetic operators on vectorsQuiz: Vector MultiplicationExercise: Multiply numeric vectorsUsing relational operatorsExercise: Compare numeric valuesExercise: Compare temperaturesUsing logical operatorsExercise: Use the & operatorExercise: Use the | operatorUsing the %in% operatorExercise: Use the %in% operator

R is everywhere

Not collected

R is everywhere

R is everywhere

Introduction to R

R is everywhere

Quiz: R Facts

R is everywhere

Why Use R?

R is everywhere

Quiz: Using R

R is everywhere

You R in Good Company

R is everywhere

Building Blocks

R is everywhere

Exercise: Submit your first code

R is everywhere

Combine values into a vector

Not collected

Combine values into a vector

Combine values into a vector

Introduction to Vectors

Combine values into a vector

Types of vectors

Combine values into a vector

Quiz: Data Types

Combine values into a vector

Creating a sequence of numbers

Combine values into a vector

Exercise: Use the : operator

Combine values into a vector

Concatenating numeric values to a vector

Combine values into a vector

Exercise: Concatenate numbers

Combine values into a vector

Creating character vectors

Combine values into a vector

Exercise: Create a character vector

Combine values into a vector

Exercise: Concatenate text

Combine values into a vector

Creating logical vectors

Combine values into a vector

Exercise: Concatenate logical values

Combine values into a vector

Quiz: Vectors Recap

Combine values into a vector

Create variables through assignments

Not collected

Create variables through assignments

Create variables through assignments

Assigning variables

Create variables through assignments

Exercise: Assign numeric vector to variable

Create variables through assignments

Exercise: Assign character vector to variable

Create variables through assignments

Quiz: Variable Overriding

Create variables through assignments

Quiz: Vector Concatenation

Create variables through assignments

Naming rules

Create variables through assignments

Quiz: Naming Rules

Create variables through assignments

Use basic operators

Not collected

Use basic operators

Use basic operators

Using R as a pocket calculator

Use basic operators

Exercise: Use basic arithmetic

Use basic operators

Applying arithmetic operators on vectors

Use basic operators

Quiz: Vector Multiplication

Use basic operators

Exercise: Multiply numeric vectors

Use basic operators

Using relational operators

Use basic operators

Exercise: Compare numeric values

Use basic operators

Exercise: Compare temperatures

Use basic operators

Using logical operators

Use basic operators

Exercise: Use the & operator

Use basic operators

Exercise: Use the | operator

Use basic operators

Using the %in% operator

Use basic operators

Exercise: Use the %in% operator

Use basic operators

Call existing R code through functions

Not collected

Call existing R code through functions

Call existing R code through functions

Introduction to functions

Call existing R code through functions

Exercise: Use the sqrt() function

Call existing R code through functions

Customizing functions through parameters

Call existing R code through functions

Exercise: Use the sample() function

Call existing R code through functions

Exercise: Use the seq() function

Call existing R code through functions

Use existing functions and data through packages

Not collected

Use existing functions and data through packages

Use existing functions and data through packages

Introduction to packages

Use existing functions and data through packages

Calling a package

Use existing functions and data through packages

Exercise: Check for leap year

Use existing functions and data through packages

R is everywhere

Recipe — Not collected

Combine values into a vector

Recipe — Not collected

Create variables through assignments

Recipe — Not collected

Use basic operators

Recipe — Not collected

Call existing R code through functions

Recipe — Not collected

Use existing functions and data through packages

Recipe — Not collected

Introduction to R

Go to Course Dashboard

Basics

Badge locked

Table of Contents