emphatic
data.frame or matrix.R/hl-dataframe.R
hl_loc.Rd
Highlight elements by location within an emphatic
data.frame or matrix.
hl_loc(
.data,
palette,
row_ids,
col_ids,
elem = "fill",
major = "row",
expand_grid = TRUE
)
emphatic
data.frame or matrix.
colours to use for highlighting. This may be a single R colour,
a vector of R colours, or
a ggplot2
style "Scale" object e.g. scale_colour_continuous()
.
numeric indices of which rows and columns to highlight
Apply the highlighting to the 'fill' (the background) or the 'text'. Default: 'fill'
which is the direction in which to first replicate colours? i.e. should colour be replicated to match the number of rows first, or the number of columns? Default: 'row'. Possible values: 'row', 'column'
How should the vectors of row and column indices be combined
to create location coorinates? If expand_grid = TRUE
(the default)
then a full outer join is done
on rows and cols using expand.grid()
- this means that all possible
combinations of the specified rows and columns will be highlighted.
Otherwise the locations are
created using a simpler call to cbind()
.