comparison ks_distribution.R @ 28:9b6252925ccf draft

Uploaded
author greg
date Mon, 26 Jun 2017 10:09:33 -0400
parents 23c0f5c519ac
children 62bb454ad4e9
comparison
equal deleted inserted replaced
27:23c0f5c519ac 28:9b6252925ccf
153 return(fx) 153 return(fx)
154 } 154 }
155 155
156 # Handle colors for components. 156 # Handle colors for components.
157 if (is.na(opt$colors)) 157 if (is.na(opt$colors))
158 { 158 {
159 # Randomly specify colors for components. 159 # Randomly specify colors for components.
160 specified_colors <- c('red', 'yellow', 'green', 'black', 'blue', 'darkorange') 160 specified_colors <- c('red', 'yellow', 'green', 'black', 'blue', 'darkorange')
161 } 161 }
162 else 162 else
163 { 163 {
164 # Handle selected colors for components. 164 # Handle selected colors for components.
165 parser <- newJSONParser() 165 parser <- newJSONParser()
166 parser$addData(opt$colors) 166 parser$addData(opt$colors)
167 raw_colors <- parser$getObject() 167 raw_colors <- parser$getObject()
168 specified_colors <- c() 168 specified_colors <- c()
169 for (raw_color in raw_colors) { 169 for (raw_color in raw_colors)
170 {
170 specified_colors <- c(specified_colors, raw_color) 171 specified_colors <- c(specified_colors, raw_color)
172 }
171 } 173 }
172 174
173 # Read in the components data. 175 # Read in the components data.
174 components_data <- read.delim(opt$components_input, header=TRUE) 176 components_data <- read.delim(opt$components_input, header=TRUE)
175 number_comp <- opt$number_comp 177 number_comp <- opt$number_comp