Mercurial > repos > guerler > charts
diff boxplot.r @ 22:f1c9378592be draft
Uploaded
author | guerler |
---|---|
date | Fri, 25 Apr 2014 20:08:26 -0400 |
parents | a3b34c760a79 |
children | e10dbc437d8f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/boxplot.r Fri Apr 25 20:08:26 2014 -0400 @@ -0,0 +1,21 @@ +wrapper <- function(table, columns, options) { + + # initialize output list + l <- list() + + # loop through all columns + for (key in names(columns)) { + # load column data + column <- as.numeric(columns[key]) + column_data <- sapply( table[column], as.numeric ) + + # create hist data + data <- boxplot(column_data, plot=FALSE) + + # collect vectors in list + l <- append(l, list(data$stats)) + } + + # return + return (l) +}