R Vector

From GM-RKB
Jump to navigation Jump to search

An R Vector is a data vector associated to an R vector data structure.



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.