Basic data types in R

R Programming Language / Data Types in R Language

326

Program:

# Change my_numeric to be 42
my_numeric <- 42.5

# Change my_character to be "universe"
my_character <- "some text"

# Change my_logical to be FALSE
my_logical <- TRUE

Output:

> # Change my_numeric to be 42
> my_numeric <- 42
> 
> # Change my_character to be "universe"
> my_character <- "universe"
> 
> # Change my_logical to be FALSE
> my_logical <- FALSE

Explanation:

Change the value of the: my_numeric variable to 42. my_character variable to "universe". Note that the quotation marks indicate that "universe" is a character. my_logical variable to FALSE. Note that R is case sensitive!

This Particular section is dedicated to Programs only. If you want learn more about R Programming Language. Then you can visit below links to get more depth on this subject.