A symbolic vector is represented by VecBasic S4 class.
Vector and V are constructors of VecBasic.
Arguments
- x, ...
R objects.
Details
There are some differences between Vector and V.
For double values, V will check whether they are
whole number, and convert them to integer if so.
Vector will not.
V does not accept "non-scalar" arguments,
like Vector(c(1,2,3)).
Examples
a <- S("a")
b <- S("b")
Vector(a, b, a + b, 42L)
#> VecBasic of length 4
#> V( a, b, a + b, 42 )
Vector(list(a, b, 42L))
#> VecBasic of length 3
#> V( a, b, 42 )
Vector(1,2,a)
#> VecBasic of length 3
#> V( 1.0, 2.0, a )
V(1,2,a)
#> VecBasic of length 3
#> V( 1, 2, a )