# NOT RUN {
# simply calling a plotting function will result in showing the chart
bar_chart(
data = data.frame(
cat = c('a', 'b', 'c'),
series = c(12,15,16)),
cat = 'cat',
series = 'series')
# result of the plotting function can also be assigned
barchart <- bar_chart(
data = data.frame(
cat = c('a', 'b', 'c'),
series = c(12,15,16)),
cat = 'cat',
series = 'series')
# and explicitly printed
print(barchart)
# or implicitly printed
barchart
# }
Run the code above in your browser using DataLab