changeset 2:a3b34c760a79 draft

Uploaded
author guerler
date Thu, 17 Apr 2014 11:19:06 -0400
parents f2d42848d165
children 65f4abe945aa
files boxplot.r
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/boxplot.r	Thu Apr 17 11:19:06 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)
+}