ggmatrix_location | R Documentation |
ggmatrix
plot locationsexperimental
ggmatrix_location(pm, location = NULL, rows = NULL, cols = NULL)
pm |
|
location |
|
rows |
numeric vector of the rows to be used. Will be used with |
cols |
numeric vector of the cols to be used. Will be used with |
Convert many types of location values to a consistent data.frame
of row
and col
values.
Data frame with columns c("row", "col")
containing locations for the plot matrix
pm <- ggpairs(tips, 1:3)
# All locations
ggmatrix_location(pm, location = "all")
ggmatrix_location(pm, location = TRUE)
# No locations
ggmatrix_location(pm, location = "none")
# "upper" triangle locations
ggmatrix_location(pm, location = "upper")
# "lower" triangle locations
ggmatrix_location(pm, location = "lower")
# "diag" locations
ggmatrix_location(pm, location = "diag")
# specific rows
ggmatrix_location(pm, rows = 2)
# specific columns
ggmatrix_location(pm, cols = 2)
# row and column combinations
ggmatrix_location(pm, rows = c(1, 2), cols = c(1, 3))
# matrix locations
mat <- matrix(TRUE, ncol = 3, nrow = 3)
mat[1, 1] <- FALSE
locs <- ggmatrix_location(pm, location = mat)
## does not contain the 1, 1 cell
locs
# Use the output of a prior ggmatrix_location
ggmatrix_location(pm, location = locs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.