plotScatterM: Scatter plot matrix

View source: R/plotScatterM.R

plotScatterMR Documentation

Scatter plot matrix

Description

Produces a scatter plot matrix between the selected columns of the outcomes matrix Y choosing specific colors and markers for the design factors on the upper and lower diagonal.

Usage

plotScatterM(
  Y,
  cols,
  design,
  labelVector = NULL,
  title = "Scatterplot matrix",
  varname.colorup = NULL,
  varname.colordown = NULL,
  varname.pchup = NULL,
  varname.pchdown = NULL,
  vec.colorup = NULL,
  vec.colordown = NULL,
  vec.pchup = NULL,
  vec.pchdown = NULL
)

Arguments

Y

nxm matrix with n observations and m variables.

cols

A vector with either the column names of the Y matrix to plot (character) or the column index positions.

design

A nxk "free encoded" experimental design data frame.

labelVector

Labels to display on the diagonal. If NULL, the cols names are used.

title

Title of the graph.

varname.colorup

A character with the name of the variable used to color the upper triangle.

varname.colordown

A character with the name of the variable used to color the lower triangle.

varname.pchup

A character with the name of the variable used to mark points for the upper triangle.

varname.pchdown

A character with the name of the variable used to mark points for the lower triangle.

vec.colorup

A color vector with a length equivalent to the number of levels of varname.colorup.

vec.colordown

A color vector with a length equivalent to the number of levels of varname.colordown.

vec.pchup

A pch vector with a length equivalent to the number of levels of varname.pchup.

vec.pchdown

A pch vector with a length equivalent to the number of levels of varname.pchdown.

Value

A matrix of scatter plots.

Examples


data("UCH")

plotScatterM(Y = UCH$outcomes, cols = c(1:4), design = UCH$design,
             varname.colorup = "Hippurate", varname.colordown = "Citrate",
             varname.pchup = "Time", varname.pchdown = "Day",
             vec.colorup = c("red","blue","black"),
             vec.colordown = c("orange","purple","green"),
             vec.pchup = c(1,2), vec.pchdown = c(15,16))


bgovaerts/LMWiRe documentation built on Sept. 17, 2022, 12:32 a.m.