Learn R Programming

analytics (version 3.0)

Wbiplot: Weighted Biplot

Description

Wbiplot produces a biplot with any weight distribution between Row and Column markers. This way the full spectrum from perfect row resolution (Row-metric preserving biplot) to perfect column resolution (Column-metric preserving biplot) is available.

Usage

Wbiplot(df, numer1, denom1 = 1, numer2, denom2 = 1, cx = 0.5)

Arguments

df

a dataframe with numeric values only

numer1

numerator of first exponent (can be a decimal)

denom1

denominator of first exponent (default: 1)

numer2

numerator of second exponent (can be a decimal)

denom2

denominator of second exponent (default: 1)

cx

graphical magnification factor (default: 0.5)

Value

A biplot of a dataframe with the specified weights. Weights can either be supplied as two fractions, or as two decimal numbers.

Details

This function makes use of function Matpow from package powerplus to be able to raise any valid matrix (see Matpow documentation) to any real power between 0 and 1 included.

See Also

Matpow

Examples

Run this code
# NOT RUN {
require(graphics)

# Exemple 1: Row metric preserving
Wbiplot(USArrests, numer1 = 1, numer2 = 0, cx = 0.6)

# Exemple 2: Column metric preserving
Wbiplot(USArrests, numer1 = 0, numer2 = 1, cx = 0.6)

# Comparison with function \code{biplot} from package \pkg{stats}
biplot(princomp(USArrests), cex = 0.6)

# Example 3: Custom, 50-50
Wbiplot(USArrests, numer1 = 0.5, numer2 = 0.5)

# Example 4: Custom, 20-80
Wbiplot(USArrests, numer1 = 0.2, numer2 = 0.8)

# }

Run the code above in your browser using DataLab