Why are vectors created using : of the type integer and vectors created using c() of type double?
a <- 1:7
typeof(a)
# "integer"
class(a)
# "integer"
b <- c(1,2,3,4,5,6,7)
typeof(b)
# "double"
class(b)
# "numeric"
Why are vectors created using : of the type integer and vectors created using c() of type double?
a <- 1:7
typeof(a)
# "integer"
class(a)
# "integer"
b <- c(1,2,3,4,5,6,7)
typeof(b)
# "double"
class(b)
# "numeric"