Learn R Programming

smvgraph (version 0.1.2)

andrews: andrews

Description

Andrews curves for visualization of multidimensional data. step determines the number of line segments for each curve. If ymax==NA then the maximum y coordinate will be determined from the curves. Note that for type==3 the x range is \([0, 4*pi]\) otherwise \([-pi, pi]\).

Usage

andrews(x, type = 1, step = 100, ..., normalize = 1, ymax = NA)

Arguments

x

data frame or matrix

type

type of curve (default: 1)

  • 1: \(f(t)=x1/(2^0.5)+x2*sin(t)+x3*cos(t)+x4*sin(2*t)+x5*cos(2*t)+...\)

  • 2: \(f(t)=x1*sin(t)+x2*cos(t)+x3*sin(2*t)+x4*cos(2*t)+...\)

  • 3: \(f(t)=x1*cos(t)+x2*cos((2*t)^0.5)+x3*cos((3*t)^0.5)+...\)

  • 4: \(f(t)=1/(2^0.5)*(x1+x2*(sin(t)+cos(t))+x3*(sin(t)-cos(t))+x4*(sin(2*t)+cos(2*t))+x5*(sin(2*t)-cos(2*t))+...)\)

step

smoothness of curves

...

further parameters given to graphics::plot and graphics::lines()

normalize

integer: normalization method (default: 1)

  • 0: no rescaling

  • 1: \((x-min(x))/(max(x)-min(x))\)

  • 2: \((x-mean(x))/sd(x)\)

ymax

numeric: maximum of y coordinate (default: NA)

Value

nothing

References

  • Andrews, D. F. (1972) Plots of High-Dimensional Data. Biometrics, vol. 28, no. 1, pp. 125-136.

  • Khattree, R., Naik, D. N. (2002) Andrews Plots for Multivariate Data: Some New Suggestions and Applications. Journal of Statistical Planning and Inference, vol. 100, no. 2, pp. 411-425.

See Also

In package andrews or at CRAN

Examples

Run this code
# NOT RUN {
andrews(iris[,-5], col=as.factor(iris[,5]))
andrews(iris[,-5], type=4, col=as.factor(iris[,5]), ymax=2)
# }

Run the code above in your browser using DataLab