pieCoin: pie charts.

View source: R/pie.R

pieCoinR Documentation

pie charts.

Description

It generates pie charts from a coin object.

Usage

pieCoin(x, colors = c("#000000","#8dc7e6", "#ffffff","#005587"),
  nodes = NULL, links = NULL, name = NULL, lcolor = NULL, expected = TRUE,
  abline = NULL, main = NULL, note = NULL, showLegend = TRUE, help = NULL,
  helpOn = FALSE, cex = 1, language = c("en", "es", "ca"), dir = NULL)

Arguments

x

a coin object.

nodes

a data frame with information for each event.

links

a data frame with information for each pie.

name

name of the column with names in the nodes data frame.

colors

a vector of colors to be used when filling the slices.

lcolor

name of the column with color variable in the links data frame.

expected

Should expected coincidences be displayed?

abline

adds one or more straight lines between pies.

main

upper title of the graph.

note

lower title of the graph.

showLegend

a logical value true if the legend is to be shown.

help

a character string indicating a help text of the graph.

helpOn

Should the help be shown at the beginning?

cex

number indicating the amount by which plotting text should be scaled relative to the default.

language

a character vector (es=spanish; en=english; ca=catalan).

dir

a "character" string representing the directory where the web files will be saved.

Value

a pieCoin object.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

## Hair by Eye by Sex table from M. Friendly (2000)
data(HairEyeColor)
H<-as.data.frame(HairEyeColor)
W<-H$Freq
I<-dichotomize(H,c("Hair","Eye","Sex"),add=FALSE)
C <- coin(I,w=W)
pie <- pieCoin(C)
## Not run: 
plot(pie)

## End(Not run)

netCoin documentation built on Oct. 18, 2024, 5:10 p.m.