Kiểu dữ liệu cơ bản

Giới thiệu R cho Tài chính

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

Số (numeric)

42.5
42.5
5
5
5L
5
Giới thiệu R cho Tài chính

Ký tự (character)

"Hello world"
"Hello world"
"forty"
"forty"
"5"
"5"
Giới thiệu R cho Tài chính

Logic (logical)

TRUE
TRUE
FALSE
FALSE
true
Error: object 'true' not found
NA
NA
Giới thiệu R cho Tài chính

Biến và kiểu dữ liệu

my_answer <- TRUE

my_answer
TRUE
food <- "carrots"

food
"carrots"
Giới thiệu R cho Tài chính

class()

my_answer <- TRUE

class(my_answer)
"logical"
class(5)
"numeric"
class(5L)
"integer"
Giới thiệu R cho Tài chính

Passons à la pratique !

Giới thiệu R cho Tài chính

Preparing Video For Download...