plotPie: Count each event type and draw pie chart

View source: R/Common.R

plotPieR Documentation

Count each event type and draw pie chart

Description

Count each event type and draw pie chart

Usage

plotPie(
  data,
  color = "jco",
  colid = 2,
  alpha = 1,
  title = "",
  border = "white",
  label = FALSE,
  show.total.inTitle = FALSE,
  DonutChart = FALSE
)

Arguments

data

A data.frame or list object.

color

ggsci color palette

colid

If provide data.frame, column id need to be set

alpha

Alpha value in plot

title

Pie title

border

Border color

label

Whether to show labels

show.total.inTitle

If to show the total number in title

DonutChart

If plot based on donut chart. More beautiful.

Examples

plotPie(ioe.events.df$Type, title = "# of events")
or plotPie(ioe.events.df, col = 2, title = "# of events")

plotPie( rep(c("A", "B", "C"), c(10, 60, 30)) )



ProfessionalFarmer/loonR documentation built on Oct. 9, 2024, 9:56 p.m.