diff heatmap.r @ 53:5a478e171752 draft

Uploaded
author guerler
date Thu, 05 Jun 2014 13:38:00 -0400
parents eafc7121f553
children 680cf68098d5
line wrap: on
line diff
--- a/heatmap.r	Thu Jun 05 13:37:37 2014 -0400
+++ b/heatmap.r	Thu Jun 05 13:38:00 2014 -0400
@@ -1,13 +1,10 @@
-# limits
-min_limit = 20
-
 # load sparse matrix package
 suppressPackageStartupMessages(library('Matrix'))
 
 # access a numeric column
 get_numeric <- function(table, column_key) {
     column <- as.numeric(column_key)
-    column_data <- sapply( table[column], as.numeric )
+    column_data <- suppressWarnings(as.numeric(as.character(table[column][[1]])))
     return (c(column_data))
 }
 
@@ -85,15 +82,8 @@
         # reorder matrix
         my_matrix <- my_matrix[row_order, col_order]
         
-        # get min size
-        min_limit = max(as.integer(options$limit), min_limit)
-        
-        # get max size
-        max_row = min(length(row_order), min_limit)
-        max_col = min(length(col_order), min_limit)
-        
         # transform back to three columns
-        my_flatmatrix = flatten(my_matrix[1:max_row, 1:max_col])
+        my_flatmatrix = flatten(my_matrix)
         
         # append to result list
         l <- append(l, list(my_flatmatrix$i))