powered by
Concatenate the elements of two grids
# S3 method for repgrid cbind(..., .reorder = TRUE, .unique = FALSE)
repgrid with combined elements.
repgrid
repgrid objects or list of objects.
If TRUE (default), matches construct order of y to x.
TRUE
y
x
If FALSE (default), x and y may have common elements. If FALSE, they must be mutually exclusive.
FALSE
x <- boeker[, 1:2] y <- boeker[, 5:7] cbind(x, y) x / y y_reordered <- y[sample(nrow(y)), ] cbind(x, y, y_reordered)
Run the code above in your browser using DataLab