# Learn R: Introduction

Learn the basics of R Syntax and jumpstart your journey into data analysis.

Start## Key Concepts

Review core concepts you need to learn to master this subject

R Logical Data Type

NA Data Type in R

Mathematical Operations in R

R Data Types

R Conditional Statements

R Comments

R’s Character Data Type

Assignment Operator in R

R Logical Data Type

R Logical Data Type

The R logical data type has two possible values - `TRUE`

or `FALSE`

.

It is important for the capitalization to stay as shown and to make sure not to wrap the values in quotes.

Introduction to R Syntax

Lesson 1 of 1

- 2Let’s start with the basic syntax for mathematical calculations in R. R performs addition, subtraction, multiplication, and division with +, -, *, and /: # Results in “500” 573 - 74 + 1 # Results…
- 4Now that you know how to calculate basic math and add comments explaining your code, let’s dive into how R “thinks about” different types of data. In R and in programming,
*data types*are the clas… - 7In R, we will often perform a task based on a condition. For example, if we are analyzing data for the summer, then we will only want to look at data that falls in June, July, and August. We can p…
- 8When writing conditional statements, sometimes we need to use different types of operators to compare values. These operators are called comparison operators. Here is a list of some handy comparis…
- 9Working with conditionals means that we will be using logical, true or false values. In R, there are operators that work with logical values known as logical operators. We can use logical operators…
- 10Functions are actions we can perform. R provides a number of functions, and you’ve actually been using a few of them even though you maybe didn’t realize! We
*call*, or use, these functions by sta… - 11R’s popularity is also largely due to the many fantastic packages available in the language! A package is a bundle of code that makes coding certain tasks easier. There are all sorts of packages fo…

## What you'll create

Portfolio projects that showcase your new skills

## How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory