--Managing Vectors
#Creating Vectors
# integer vector
w <- 8:17
w
## [1] 8 9 10 11 12 13 14 15 16 17
# double precision floating point (number with decimals) vector
x <- c(0.5, 0.6, 0.2)
x
## [1] 0.5 0.6 0.2
# logical vector
y <- c(TRUE, FALSE, FALSE)
y
## [1] TRUE FALSE FALSE
# Character vector
z <- c("a", "b", "c")
z
## [1] "a" "b" "c"#Coercing Vectors
#Adding on to Vectors
#Adding Attributes to Vectors
#Subsetting Vectors
Subsetting with positive integers:
Subsetting with negative integers:
Subsetting with logical values:
Subsetting with names:
Simplifying vs. Preserving:
#Exercises
Last updated