viplot: variable importance plot

Description Usage Arguments Details See Also Examples

Description

This function plots varible importances using a barplot.

Usage

1
2
viplot(varimp, xlab, xlab.mar = 5, ylab.mar = 4, xlab.srt = 90, 
xlab.cex = 1, sort = FALSE, ...)

Arguments

varimp

A numeric vector, variable importances.

xlab

A vector of strings. Labels to be plotted on x-axis.

xlab.mar

A positive value. The margin reserved for x-axis labels.

ylab.mar

A positive value, The margin reserved for y-axis labels.

xlab.srt

A numeric value, amount of rotation of the x-axis labels.

xlab.cex

A positive value, magnitude of x-axis labels.

sort

A logical value, TRUE if sorted variables should be plotted.

...

The barplot options.

Details

It is not strightforward to rotate x labels of a barplot. This function does it easily.

See Also

imp, dptplot, ditplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(gaelle)
gaelle.bclust<-bclust(gaelle,
transformed.par=c(-1.84,-0.99,1.63,0.08,-0.16,-1.68))
gaelle.imp<-imp(gaelle.bclust)
viplot(varimp=gaelle.imp$var)
# solid plot 

viplot(varimp=gaelle.imp$var,xlab=imp(gaelle.bclust)$labels,
sort=TRUE,col=heat.colors(length(gaelle.imp$var))) 
# sorted plot with heat colors and labels

Example output

2/55
3/55
4/55
5/55
6/55
7/55
8/55
9/55
10/55
11/55
12/55
13/55
14/55
15/55
16/55
17/55
18/55
19/55
20/55
21/55
22/55
23/55
24/55
25/55
26/55
27/55
28/55
29/55
30/55
31/55
32/55
33/55
34/55
35/55
36/55
37/55
38/55
39/55
40/55
41/55
42/55
43/55
44/55
45/55
46/55
47/55
48/55
49/55
50/55
51/55
52/55
53/55
54/55
55/55

bclust documentation built on May 2, 2019, 5 p.m.

Related to viplot in bclust...