annotate boxplot.r @ 61:107b6d28d6a5 draft

Uploaded
author guerler
date Tue, 24 Jun 2014 16:09:48 -0400
parents e10dbc437d8f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
1 wrapper <- function(table, columns, options) {
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
2
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
3 # initialize output list
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
4 l <- list()
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
5
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
6 # loop through all columns
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
7 for (key in names(columns)) {
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
8 # load column data
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
9 column <- as.numeric(columns[key])
52
e10dbc437d8f Uploaded
guerler
parents: 2
diff changeset
10 column_data <- suppressWarnings(as.numeric(as.character(table[column][[1]])))
e10dbc437d8f Uploaded
guerler
parents: 2
diff changeset
11
2
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
12 # create hist data
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
13 data <- boxplot(column_data, plot=FALSE)
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
14
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
15 # collect vectors in list
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
16 l <- append(l, list(data$stats))
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
17 }
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
18
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
19 # return
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
20 return (l)
a3b34c760a79 Uploaded
guerler
parents:
diff changeset
21 }