changeset 37:ee4ebdf2935e draft

Uploaded
author greg
date Mon, 26 Jun 2017 11:22:20 -0400
parents 6aeba53e195b
children 68447763ccc2
files ks_distribution.R
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ks_distribution.R	Mon Jun 26 10:55:49 2017 -0400
+++ b/ks_distribution.R	Mon Jun 26 11:22:20 2017 -0400
@@ -1,7 +1,6 @@
 #!/usr/bin/env Rscript
 
 suppressPackageStartupMessages(library("optparse"))
-suppressPackageStartupMessages(library("rjson"))
 
 option_list <- list(
     make_option(c("-c", "--components_input"), action="store", dest="components_input", help="Ks significant components input dataset"),
@@ -26,13 +25,12 @@
     else
     {
         # Handle selected colors for components.
-        parser <- newJSONParser()
-        parser$addData(colors)
-        raw_colors <- parser$getObject()
         specified_colors <- c()
-        for (raw_color in raw_colors)
+        cStr <- unlist(colors)
+        items <- strsplit(cStr, ",")
+        for (item in items)
         {
-            specified_colors <- c(specified_colors, raw_color)
+            specified_colors <- c(specified_colors, item)
         }
         num_colors_specified = length(specified_colors)
         if (num_colors_specified < number_comp)