andrews | R Documentation |
Andrews curves for visualization of multidimensional data.
For colouring the curves see the details.
For differences between andrews
and andrews0
see the vignette("andrews")
.
With the same parameters called both functions should create the same plot.
type==5
is a modification of type==3
and type==6
is a modification of type==4
.
andrews(
df,
type = 1,
clr = NULL,
step = 100,
ymax = 10,
alpha = NULL,
palcol = NULL,
lwd = 1,
lty = "solid",
...
)
df |
data frame or an R object that can be converted into a data frame with |
type |
type of curve
|
clr |
number/name of column in the data frame for color of curves |
step |
smoothness of curves |
ymax |
maximum of |
alpha |
semi-transparent color ( |
palcol |
a function which generates a set of colors, see details |
lwd |
line width, a positive number, defaulting to 1. |
lty |
line type, can either be specified as an integer (0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash) or as one of the character strings "blank", "solid", "dashed", "dotted", "dotdash", "longdash", or "twodash", where "blank" uses ‘invisible lines’ (i.e., does not draw them). |
... |
further named parameters given to |
If clr
has length one then it is used as column number or column name
for coloring the curves:
If df[,clr]
is numeric then palcol
must be function which returns
colors for values in the range \[0, 1\]
using normalized variable.
The default is function function(v) { hsv(0,1,v) }
.
Otherwise df[,clr]
is converted to a factor and palcol
must be a function
which returns for each level a color. The parameter for palcol
is the numbe of
levels and the default is grDevices::rainbow()
.
If the length of clr
is the number of rows of df
then clr
is interpreted as
colors.
Andrews curves transform multidimensional data into curves. This package presents four types of curves.
nothing
Sigbert Klinke sigbert@hu-berlin.de, Jaroslav Myslivec jaroslav.myslivec@upce.cz
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.
data(iris)
op <- par(mfrow=c(1,2))
andrews0(iris,clr=5,ymax=3)
andrews(iris,clr=5,ymax=3)
par(op)
andrews(iris,type=4,clr=5,ymax=NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.