Mercurial > repos > greg > ks_distribution
changeset 46:399cd9dd2c3e draft
Uploaded
author | greg |
---|---|
date | Mon, 26 Jun 2017 14:09:09 -0400 |
parents | f8b303b9f455 |
children | 06461aa190f7 |
files | ks_distribution.R |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ks_distribution.R Mon Jun 26 14:03:11 2017 -0400 +++ b/ks_distribution.R Mon Jun 26 14:09:09 2017 -0400 @@ -31,15 +31,15 @@ num_colors_specified <- length(specified_colors) if (num_colors_specified < number_comp) { for (i in num_colors_specified:number_comp) { - if (!any(specified_colors == 'red')) { + if (!grep('red', specified_colors)) { specified_colors <- c(specified_colors, 'red') - } else if (!any(specified_colors == 'yellow')) { + } else if (!grep('yellow', specified_colors)) { specified_colors <- c(specified_colors, 'yellow') - } else if (!any(specified_colors == 'green')) { + } else if (!grep('green', specified_colors)) { specified_colors <- c(specified_colors, 'green') - } else if (!any(specified_colors == 'black')) { + } else if (!grep('black', specified_colors)) { specified_colors <- c(specified_colors, 'black') - } else if (!any(specified_colors == 'blue')) { + } else if (!grep('blue', specified_colors)) { specified_colors <- c(specified_colors, 'blue') } else { specified_colors <- c(specified_colors, 'darkorange')