R Vector
Jump to navigation
Jump to search
An R Vector is a data vector associated to an R vector data structure.
- AKA: R Tuple.
- Example(s):
x <- c(3, 5, 5, 3.113, "yes")
- Counter-Example(s):
- an R Matrix.
- a Perl Vector.
- See: Tuple.
References
2012
- http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment
- To set up a vector named x, say, consisting of five numbers, namely 10.4, 5.6, 3.1, 6.4 and 21.7, use the R command
> x <- c(10.4, 5.6, 3.1, 6.4, 21.7)
This is an assignment statement using the function c() which in this context can take an arbitrary number of vector arguments and whose value is a vector got by concatenating its arguments end to end.6
A number occurring by itself in an expression is taken as a vector of length one.
- To set up a vector named x, say, consisting of five numbers, namely 10.4, 5.6, 3.1, 6.4 and 21.7, use the R command