# HG changeset patch # User greg # Date 1498490540 14400 # Node ID ee4ebdf2935e9e44ea243643db8b1dd12928f986 # Parent 6aeba53e195b115ca4081e5f1245d9c853b4a486 Uploaded diff -r 6aeba53e195b -r ee4ebdf2935e ks_distribution.R --- 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)