ชนิดข้อมูลพื้นฐาน

R เบื้องต้นสำหรับการเงิน

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

ตัวเลข

42.5
42.5
5
5
5L
5
R เบื้องต้นสำหรับการเงิน

ตัวอักษร

"Hello world"
"Hello world"
"forty"
"forty"
"5"
"5"
R เบื้องต้นสำหรับการเงิน

ตรรกะ

TRUE
TRUE
FALSE
FALSE
true
Error: object 'true' not found
NA
NA
R เบื้องต้นสำหรับการเงิน

ตัวแปรและชนิดข้อมูล

my_answer <- TRUE

my_answer
TRUE
food <- "carrots"

food
"carrots"
R เบื้องต้นสำหรับการเงิน

`class()`

my_answer <- TRUE

class(my_answer)
"logical"
class(5)
"numeric"
class(5L)
"integer"
R เบื้องต้นสำหรับการเงิน

มาฝึกกันเถอะ!

R เบื้องต้นสำหรับการเงิน

Preparing Video For Download...