andrews0 {andrews}R Documentation

Andrews curves

Description

Andrews curves for visualization of multidimensional data. For differences between andrews and andrews2 see the 'vignette("andrews"). For colouring the curves see the details.

Usage

andrews0(
  df,
  type = 1,
  clr = NULL,
  step = 100,
  ymax = 10,
  main = NULL,
  sub = NULL
)

Arguments

df

data frame

type

type of curve

  • 1: f(t)=x_1/\sqrt{2}+x_2\sin(t)+x_3\cos(t)+x_4\sin(2t)+x_5\cos(2t)+...

  • 2: f(t)=x_1\sin(t)+x_2\cos(t)+x_3\sin(2t)+x_4\cos(2t)+...

  • 3: f(t)=0.5^{p/2}x_1+0.5^{(p-1)/2} x_2(\sin(t)+\cos(t))+0.5^{(p-2)/2} x_3(\sin(t)-\cos(t))+0.5^{(p-3)/2} x_4(\sin(2t)+\cos(2t))+0.5^{(p-6)/2}x_5(\sin(2t)-\cos(2t))+...) with $p$ the number of variables

  • 4: f(t)=1/\sqrt{2}(x_1+x_2(\sin(t)+\cos(t))+x_3(\sin(t)-\cos(t))+x_4(\sin(2t)+\cos(2t))+x_5(\sin(2t)-\cos(2t))+...)

clr

number/name of column in the date frame for color of curves

step

smoothness of curves

ymax

maximum of y coordinate.

main

main title for the plot

sub

sub title for the plot

Details

Andrews curves transform multidimensional data into curves. This package presents four types of curves

If df[,clr] is numeric then hsv(1,1,v) with the normalized values (on ⁠\[0, 1\]⁠) of df[,clr] is used. Otherwise the number of unique values in nuv <- unique(df[,clr]) is used in connection with rainbow(nuv).

Value

nothing

Author(s)

Jaroslav Myslivec jaroslav.myslivec@upce.cz

References

Examples

data(iris)
andrews0(iris,clr=5,ymax=3)
andrews0(iris,type=4,clr=5,ymax=2)

[Package andrews version 1.1.2 Index]