xb_help | R Documentation |
Error-checked extensions of rbind
and/or cbind
that can handle NULL
arguments as long as there is at least one non-NULL
...
argument.
xb_help()
cb(...)
rb(...)
... |
Multiple |
An atomic data.frame or an atomic matrix.
cb()
: Columns binds any compatible non-NULL
...
arguments. If there is only one nonNULL
argument and it is a matrix or data.frame, returns that argument.
rb()
: Row binds any compatible non-NULL
...
arguments. If there is only one nonNULL
argument and it is a matrix or data.frame, returns that argument.
egXb <- function() {
m2x2 <- base::matrix(1:4, nrow = 2)
m3x2 <- base::matrix(1:6, nrow = 3)
m3x3 <- base::matrix(1:9, nrow = 3)
m4x4 <- base::matrix(1:16, nrow = 4)
d4x2 <- tibble::tibble(w = 1:4, x = letters[1:4])
d4x4 <- tibble::tibble(w = 1:4, x = letters[1:4], y = NA, z = '.')
d2x4 <- tibble::tibble(w = 1:2, x = letters[1:2], y = NA, z = '.')
d4x4b <- tibble::tibble(W = 1:4, X = letters[1:4], Y = NA, Z = '.')
list(m2x2 = uj::cb(m2x2, NULL, NULL),
m2x4 = uj::cb(m2x2, m2x2, NULL),
m2x6 = uj::cb(m2x2, m2x2, m2x2),
m3x2 = uj::rb(m3x2, NULL, NULL),
m5x2 = uj::rb(m3x2, m2x2, NULL),
m7x2 = uj::rb(m3x2, m2x2, m2x2),
m12x7 = uj::cb(uj::rb(m4x4, m4x4, m4x4), uj::rb(m3x3, m3x3, m3x3, m3x3)),
d4x2 = uj::cb(d4x2, NULL , NULL),
d4x6 = uj::cb(d4x2, d4x4b, NULL),
d4x8 = uj::cb(d4x4, d4x4b, NULL),
d6x4 = uj::rb(d2x4, d4x4 , NULL),
d8x4 = uj::rb(d2x4, d4x4 , d2x4))
}
egXb <- egXb()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.