stars(x, full=T, scale=T, radius=T, type="l", labels=<<see below>>, head=<<see below>>, max=<<see below>>, byrow=F, nrow=<<see below>>, ncol=<<see below>>)
NA
s) are allowed, but they are treated as if they were
0
.
TRUE
, the symbols will occupy a full circle.
Otherwise, they occupy the (upper) semi-circle only.
TRUE
, the columns of the data matrix are scaled
independently so that the maximum value in each column is
1
and the
minimum is
0
. If
FALSE
, the presumption is that the data have
been scaled by some other algorithm to the range
0<=x[i,j]<=1
.
TRUE
, the radii corresponding to each variable
in the data will be drawn.
"l"
,
"p"
,
"b"
for lines, points and
both.
dimnames(x)
is used, if available;
otherwise, labels are
"1"
,
"2"
, etc. If supplied, the label
vector must have length equal to
nrow(x)
.
Missing values are treated as
0
.
Each star represents one row of the input
x
.
Variables (columns) start on the right and wind counterclockwise around the
star.
The size of a (scaled) column is shown by the distance from the center
to the point on the star representing the variable.
# The stars() function is roughly equivalent to the following # function, which you can customize. my.stars <- function(x, labels = dimnames(x)[[1]], nrow = floor(sqrt(dim(x)[1])), ncol = ceiling(dim(x)[1]/nrow)) { opar <- par(mar = c(2, 0, 0, 0), mfcol = c(nrow, ncol)) on.exit(par(opar)) for(i in 1:dim(x)[1]) { starsymb(x, collab = rep("", dim(x)[2]), sample = i) if(!is.null(labels)) mtext(text = labels[i], side = 1, line = 0, cex = 1) } } stars(votes.repub[state.region=="Northeast",]/100, radius=T, scale=F, head="Republican Votes (Northeast) 1856 - 1976")