Learn R Programming

dashboard (version 0.1.0)

dcbarchart: dcbarchart adds a bar chart to the dashboard

Description

dcbarchart generates a bar chart

Usage

dcbarchart(x, title = paste(x, "bar chart"), spansize = 4, width = dashboard.env$outerwidth * spansize/12, height = 250, gap = width/2)

Arguments

x
column name of data frame data for drawing a bar chart
title
character for the title of the generated bar chart
spansize
integer between 1 to 12 for the width of the element in the row
width
integer for the width (in pixel) of the element in the web page
height
integer for the height (in pixel) of the element in the web page
gap
integer for adjusting the width of each bar

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