Basic data types

Introduzione a R per la finanza

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

Numeric

42.5
42.5
5
5
5L
5
Introduzione a R per la finanza

Character

"Hello world"
"Hello world"
"forty"
"forty"
"5"
"5"
Introduzione a R per la finanza

Logical

TRUE
TRUE
FALSE
FALSE
true
Error: object 'true' not found
NA
NA
Introduzione a R per la finanza

Variables and data types

my_answer <- TRUE

my_answer
TRUE
food <- "carrots"

food
"carrots"
Introduzione a R per la finanza

class()

my_answer <- TRUE

class(my_answer)
"logical"
class(5)
"numeric"
class(5L)
"integer"
Introduzione a R per la finanza

Let's practice!

Introduzione a R per la finanza

Preparing Video For Download...