Source Ediotr
File - New File - R script
혹은 shift + command + n
을 눌러서 열어준다[열린 모습]
Console
Environment
Files
<-
- x
<-
c(1, 3, 5)- x
-> 1 3 5
c()
- x <-
c(
1, 3, 5)
- x
-> 1 3 5
typeof()
typeof(
c("a", "b"))
-> "character"
length()
- x <- c(33.5, 57.5, 120.05)
length(
x)
-> 3
is.logical() / is.dobule() / is.integer() / is.character()
- x <- c(2L, 5L, 11L)
is.integer(
x)
-> TRUE
name()
- x <- c(1, 3, 5)
name(
x)
<- c("a", "b", "c")
-> x
-> a b c
-> 1 3 5
list()
list(
"a", 1L, 1.5, TRUE)
list(
list(list(1, 3, 5)))
List 이름 짓기
- list('Chicago' = 1, 'New York' = 2, 'Los Angeles' = 3)
- $Chicago
-> 1- $'New York'
-> 2- $'Los Angeles'
-> 3
str()
str(
list("a", 1L, 1.5, TRUE))
-> List of 4
-> $ : char "a"
-> $ : int 1
-> $ : num 1.5
-> $ : logi TRUE- list(list(list(1, 3, 5)))
-> List of 1
-> $ : List of 1
-> . . $ : List of 3
-> . . . . $ : num 1
-> . . . . $ : num 3
-> . . . . $ : num 5