# Operators & Missing Value in R

Logical Operators :

And operator (&) :

When both conditions are TRUE then output is TRUE.

Truth Table of AND operator is :

 Input 1 Input 2 Output TRUE FALSE FALSE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE FALSE

Contact at TJT@TechnicalJockey.com , if you are looking for an Instructor Based Online Training !

u<-TRUE

v<-FALSE

u&v

Output :

[1] FALSE

First condition is TRUE and second condition is TRUE . From truth table output is TRUE .

(2 > 1)&(3==3)

Output :

[1] TRUE

OR operator (|) :

When one or both conditions are TRUE then output is TRUE.

Truth Table of OR operator is :

 Input 1 Input 2 Output TRUE FALSE TRUE FALSE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE

u<-TRUE

v<-FALSE

u|v

Output :

[1] TRUE

First condition is TRUE and second condition is FALSE . From , truth table output is TRUE.

(2 >1)|(3>4)

Output :

[1] TRUE

Not operator(!) :

This operator is used to negate the value. We negate "u" object value to FALSE.

u<-TRUE

Arithmetic operator :

The operator is used for mathematics calculation.

We can sum two objects by using "+" operator.

We can subtract objects by using "-" operator.

v <- c( 3,6.2,7)

t <- c(8, 3, 4)

v-t

Output :

We can multiply two objects by using "*" operator.

v*t

We can divide objects by using "/" operator.

We can find remainder by using "%%" operator.

We can find quotient of division by using "%/%" operator .

We can find exponential degree of values by using "^" operator.

v <- c( 2,3,6)

t <- c(5, 4,4)

v^t

Output :

Miscellaneous Operators :

Colon Operator (:)

It creates a series of numbers in sequence of values .

v<-20:30

v

Output :

%in% Operator

This operator is used to identify if an element belongs to an object .

We are checking "v1" object value belongs to "t" object . If it belongs than it show TRUE in output otherwise FALSE.

Missing Values in R :

A missing value is one whose value is unknown. Missing values in R represented by NA symbol. NA is reserved word in R . We cannot use NA for give name of an object.

We can store missing value NA in an object :

We can combine NA with other values :

We can combine character object with NA :

Here "NA" is a character value while NA is missing.

We can also create NA in logical as:

Contact at TJT@TechnicalJockey.com , if you are looking for an Instructor Based Online Training !

## Looking for Corporate Training ? Reach out to us at Akriti.Lal@instrovate.com

Reach out to us if you are looking for Corporate Training to Build The Next Generation Analytical Workforce with an in-depth understanding of  Exploratory Data Analysis , Data Visualisation, Data Analytics , AI First , Machine Learning & Deep Learning Training & Consulting helping them to take Data Informed Decision at each stage of the business.

We understand that At the present times , the Entire Industry is in a Tranformation stage with the Softwares  being rebuilt with Artificial Intelligence Capabilities .

We need SMART WORKFORCE for the SMART SOFTWARES to reap the maximum return .

Whatsapp at +91-9953805788 or email at - akriti.lal@instrovate.com if you would like to know more .

• Corporate Tableau Training in Gurgaon
• Corporate Data Analytics Training in Gurgaon
• Corporate Microsoft Power BI Training in Gurgaon
• Corporate Microstrategy Training in Gurgaon
• Corporate Google Data Studio Training in Gurgaon
• Corporate Python Training in Gurgaon
• Corporate Advance Analytics in R Programming Training in Gurgaon
• Corporate Machine Learning Training in Gurgaon
• Corporate Deep Learning Training in Gurgaon
• Corporate Data Visualization Training in Gurgaon

Instrovate Technologies

Noida, Gurgaon

akriti.lal@instrovate.com

Hit Your Refresh Button To Rise Higher