XYscatter {statVisual}R Documentation

Compare Groups Based on Scatter Plots

Description

Compare groups based on scatter plots.

Usage

XYscatter(
    data, 
    x, 
    y, 
    group = NULL, 
    alpha = 1, 
    point.size = 3, 
    xlab = x, 
    ylab = y, 
    group.lab = group, 
    title = "Scatter plot", 
    theme_classic = TRUE, 
    addThemeFlag = TRUE,
    ...)

Arguments

data

A data frame. Rows are subjects; Columns are variables describing the subjects.

x

character. The column name of data that indicates the variable on the x axis of the scatter plot

y

character. The column name of data that indicates the variable on the y axis of the scatter plot

group

character. The column name of data that indicates the subject groups. The scatter plot will be drawn for each of the subject group. It also indicates the colors of the data points in the scatter plots.

alpha

Transparency of histogram inside color.

point.size

numeric. Indicate the size of the data points

xlab

x axis label

ylab

y axis label

group.lab

label of group variable

title

title of the plot

theme_classic

logical. Use classic background without grids (default: TRUE).

addThemeFlag

logical. Indicates if light blue background and white grid should be added to the figure.

...

other input parameters for facet & theme

Value

A list with 9 elements. data, layers, scales, mapping, theme, coordinates, facet plot_env, and labels.

Author(s)

Wenfei Zhang <Wenfei.Zhang@sanofi.com>, Weiliang Qiu <Weiliang.Qiu@sanofi.com>, Xuan Lin <Xuan.Lin@sanofi.com>, Donghui Zhang <Donghui.Zhang@sanofi.com>

Examples

data(diffCorDat)

print(dim(diffCorDat))
print(diffCorDat[1:2,])

statVisual(type = 'XYscatter',
  data = diffCorDat, 
  x = 'probe1', 
  y = 'probe2', 
  group = 'grp', 
  title = 'Scatter Plot: probe1 vs probe2')

XYscatter( 
  data = diffCorDat, 
  x = 'probe1', 
  y = 'probe2', 
  group = 'grp', 
  title = 'Scatter Plot: probe1 vs probe2')


[Package statVisual version 1.2.1 Index]