All examples By author By category About

meysamabl

infoVis-Meysam

Link to the D3 random barchart generation : /meysamabl/a949c2c7876b19723bfa

Link to the web page: Click here

Embedding Bar chart from R:

R image

Embedding R code in Markdown:

# Define dataset
 mydata <- c(25,7,5,26,11,8,25,14,23,19,14,11,22,29,11,13,12,17,18,10,24,18,25,9,3)
 
 # command for generating a png file
 png(filename="C:/Users/meysamabl/Desktop/barchart.png", height=295, width=300, bg="white")
 
 # generate the bar chart into the png file
 barplot(mydata);
 
 # Turn off device driver (to flush output to png)
 dev.off()