cbind.quantities | R Documentation |
S3 methods for quantities
objects (see cbind
).
## S3 method for class 'quantities'
cbind(..., deparse.level = 1)
## S3 method for class 'quantities'
rbind(..., deparse.level = 1)
... |
(generalized) vectors or matrices. These can be given as named
arguments. Other R objects may be coerced as appropriate, or S4
methods may be used: see sections ‘Details’ and
‘Value’. (For the |
deparse.level |
integer controlling the construction of labels in
the case of non-matrix-like arguments (for the default method): |
c.quantities
x <- set_quantities(1, m/s, 0.1)
y <- set_quantities(1:3, m/s, 0.2)
z <- set_quantities(8:10, m/s, 0.1)
(m <- cbind(x, y)) # the '1' (= shorter vector) is recycled
(m <- cbind(m, z)[, c(1, 3, 2)]) # insert a column
(m <- rbind(m, z)) # insert a row
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.