plotVar: Plot of Variables: Correlation Circle

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotVar.R

Description

This function provides "correlation circle", scatter plots for variables representation from MIMFA results.

Usage

1
2
3
plotVar(object, comp=c(1, 2), col=NULL, varNames=FALSE, cex=3,
        pch=19, alpha=0.7, spty=TRUE, cutoff=0, radIn=0.5,
        overlap=TRUE, ncols=2, legTitle="Tables")

Arguments

object

an object of class MIDTList as returned by MIMFA function.

comp

an integer vector of length two. The components that will be used on the horizontal and the vertical axis respectively to project the variables.

col

a character or integer vector of colors for plotted character and symbols, it must be of length the total number of data tables (see Details).

varNames

either a character vector with data table names, or FALSE for no plotting variable labels. If TRUE, the variable names in the data tables are used as variable labels in the plot. See Details.

cex

a numeric vector of character expansion sizes for the plotted character and symbols, can be of length one or of length the total number of data tables. See Details.

pch

plotting 'character'. A vector of single characters or integers, can be of length one or of length the total number of data tables (see Details). See points for all alternatives.

alpha

the alpha transparency for plotting color of the symbols, values are any numbers from 0 (transparent) to 1 (opaque).

spty

logical, specifying the type of plot region to be used. If TRUE (the default), a square plotting region is generated. If not, a maximal plotting region is produced.

cutoff

a numeric between 0 and 1. Variables with correlations below this cutoff in absolute value are not plotted (see Details).

radIn

a numeric between 0 and 1, the radius of the inner circle. Defaults to 0.5.

overlap

logical. Whether the variables in data tables should be plotted in one single panel. Default is TRUE.

ncols

numeric. When overlap = FALSE subsequent figures will be drawn in a multipanel on the device with ncols columns.

legTitle

character. The legend title.

Details

plotVar produces a "correlation circle", i.e. the correlations between each variable and the selected components are plotted as scatter plot, with concentric circles of radius one and radius given by radIn. Each point corresponds to a variable.

The varNames argument can be used in order to select a part of the data table variable labels that are drawn. For example if you have data tables named "table1" and "table2", you can use varNames = "table1" and then the variable names in the "table1" are drawn.

The arguments cex and pch can be either vectors of length one or of length the total number of data tables. In the first case, the single value determine the graphics attributes for all data table variables. Otherwise, multiple argument values can be specified so that each data table variable can be given its own graphic attributes. In this case, each component of the vector corresponds to the attributes of the each data table variable.

Value

A list containing the following components:

df

a data frame used to generate the ggplot.

ggp

an object of class ggplot.

Author(s)

Ignacio González

See Also

plotInd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#-- load data and create MIDTList object
data(NCI60)
midt <- MIDTList(NCI60$mae)

#-- performs MIMFA
midt <- MIMFA(midt, ncomp=2, M=5)

#-- default plot
plotVar(midt)

#-- select data table variables to draw and cutoff
plotVar(midt, varNames="trans", cutoff=0.55)
plotVar(midt, varNames=TRUE, cutoff=0.55)

GonzalezIgnacio/HandlingMissRows documentation built on Jan. 17, 2020, 6:29 p.m.