Numeric data
Example: 1, 2, 3, ...
x <- c(1, 2, 3)
x## [1] 1 2 3is.numeric(x)## [1] TRUEas.character(x)## [1] "1" "2" "3"Character data
Example: "a", "b", "c", ...
x <- c("1", "2", "3")
x## [1] "1" "2" "3"is.character(x)## [1] TRUEas.numeric(x)## [1] 1 2 3Complex data
Example: mix of both
c(1, "b", 3)## [1] "1" "b" "3"Logical data
Example: TRUE of FALSE
x <- 1:10 < 5
x ## [1] TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE!x## [1] FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUE TRUEwhich(x) # Returns index for the 'TRUE' values in logical vector## [1] 1 2 3 4