rpv_image: Create an image of the data matrix

Description Usage Arguments Details Value Examples

View source: R/visualization.R

Description

Create an image of the data matrix

Usage

1
2
rpv_image(tab, f = NULL, highlight = NULL, newplot = TRUE,
  col = c("#A6CEE3", "#1F78B4"), idcol = c("#FFFF99", "#B15928"))

Arguments

tab

a numeric matrix

f

a factor that is the same length as the number of columns in tab. this is used to split the matrix up by groups for analysis.

highlight

a character vector specifing which row names or indices to highlight.

newplot

When TRUE (default), The image will not over-write the previous image. Turn this off if you want to use multi-panel plotting.

col

a two-color vector for the values of the matrix.

idcol

a two-color vector for the highlight values.

Details

This function creates a plot that will allow you to visualize a matrix, optionally overlaying data. Note: the values here represent the presence/absence of a variable, but does not represent the dosage.

Value

NULL, invisibly

Examples

1
2
3
4
data(monilinia)
loci <- sapply(strsplit(colnames(monilinia), "[.]"), "[", 1)
rpv_image(monilinia, f = loci)
rpv_image(monilinia, f = loci, highlight = rpv_indices(monilinia))

zkamvar/repvar documentation built on May 7, 2019, 3:18 p.m.