ggSpine: Draw an interactive spinogram

Description Usage Arguments Value Examples

Description

Draw an interactive spinogram

Usage

1
2
3
4
ggSpine(data = acs, fillvar = "smoking", xvar = "age", yvar = NULL,
  stat = "count", position = "fill", palette = "Blues",
  interactive = FALSE, polar = FALSE, width = NULL, digits = 1,
  colour = "black", size = 0.2, addlabel = FALSE, ...)

Arguments

data

A data.frame

fillvar

A character string of column name be assigned to the fill variable

xvar

A character string of column name be assigned to the x-axis variable

yvar

A character string of column name be assigned to the y-axis variable. Uses only when stat="identity".

stat

The statistical transformation to use on the data for this layer, as a string c("count","identity")

position

Position adjustment. One of the c("fill","stack","dodge")

palette

A character string indicating the color palette

interactive

A logical value. If TRUE, an interactive plot will be returned

polar

A logical value. If TRUE, coord_polar() function will be added

width

Bar width

digits

integer indicating the number of decimal places

colour

Bar colour

size

Bar size

addlabel

A logical value. If TRUE, label will be added to the plot

...

other arguments passed on to layer.

Value

An interactive spinogram

Examples

1
2
3
4
5
6
7
#require(moonBook)
#ggSpine(data=acs,"smoking","age",width=1,color="black",size=0.2)
#ggSpine(position="stack",addlabel=TRUE)
#ggSpine(addlabel = TRUE)
#ggSpine(data=acs,"Dx","smoking",addlabel=TRUE)
#ggSpine(data=acs,"Dx","smoking",position="dodge",addlabel=TRUE)
#ggSpine(data=acs,"Dx","smoking",position="stack",addlabel=TRUE)

cardiomoon/moonBook2 documentation built on May 13, 2019, 12:40 p.m.