Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

barplot the lines of code by module

The CSV file "loc.csv" contains the following:

Module LOC
a.rb 100
b.rb 120
c.rb 54


The following R code creates the barplot image "loc.png":

data <- read.csv(file="loc.csv", sep = " ", header = TRUE, row.names = "Module")
png("loc.png", width = 640, height = 480)
barplot(data$LOC, names = rownames(data), ylim = c(0, 250), main = "Lines of code by module", ylab = "Lines of code", xlab = "Module")
dev.off()
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS