plot_a_pair_vectors: Plot to compare a pair of vectors

Description Usage Arguments Value Author(s)

View source: R/plot_compare_a_pair_vectors.R

Description

The plot function to compare a pair of vectors. One of the main usages is to check how homogeneous is the data generated on multiple plates. The points are colored by group.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_a_pair_vectors(
  x,
  y,
  grp_id,
  square = TRUE,
  log = "xy",
  main = paste("Scatter plot of", xlab, "&", ylab),
  xlab = deparse(substitute(x)),
  ylab = deparse(substitute(y)),
  col_ea_grp,
  ...,
  legend_arg = list(x = "bottomright")
)

Arguments

x

a vector of numerical values

y

a vector of values that are very likely correlated with values in 'x'

grp_id

a vector that has the group IDs of which each will be plotted in different color
- It should have same length as x and y

square

whether the ranges of the x- and y-axes in plot should same or not

log

which coordinates are in log scale. Same as 'log' in plot.default.

main, xlab, ylab

same as the ones for 'plot' generic function (refer par)

col_ea_grp

color of each group given in 'grp_id'

...

any arguments that pass to 'plot' and 'points'

legend_arg

a list of parameters to be used in adding a legend. If grp_id is missing then no legend will be displayed.

Value

A plot is generated and a "list" of x- and y- coordinate limits is returned.

Author(s)

Mun-Gwan Hong <mun-gwan.hong@scilifelab.se>


Rundmus/BAf-R_package documentation built on May 18, 2020, 12:59 p.m.