Learn R Programming

dashboard (version 0.1.0)

dcpiechart: dcpiechart adds a pie chart to the dashboard

Description

dcpiechart generates a pie chart

Usage

dcpiechart(x, title = paste(x, "pie chart"), spansize = 4, radius = 100, innerradius = 30, width = dashboard.env$outerwidth * spansize/12, height = 250)

Arguments

x
column name of data frame data for drawing a pie chart
title
character for the title of the generated pie chart
spansize
integer between 1 to 12 for the width of the element in the web page
radius
integer for the size of the radius in pixels of the pie chart
innerradius
integer for the size of the inner radius in pixels of the pie chart
width
integer for the width (in pixels) of the chart in the web page
height
integer for the height (in pixels) of the chart in the web page

Examples

Run this code
dashboard_open(data=iris) # other options: pathoutput=getwd() ...
dcpiechart(x=names(iris)[5])
dcbarchart(x=names(iris)[1] , gap=75)
dcpiechart(x=names(iris)[2])
dctable(index=names(iris)[5])
dashboard_launch(browse = FALSE) # Just generates files. Server is not launched

Run the code above in your browser using DataLab