Mercurial > repos > greg > ks_distribution
comparison ks_distribution.R @ 41:17ca41359a2d draft
Uploaded
author | greg |
---|---|
date | Mon, 26 Jun 2017 12:05:18 -0400 |
parents | 686ea47c0ce3 |
children | 60e2cf57f2c1 |
comparison
equal
deleted
inserted
replaced
40:15478b43d94d | 41:17ca41359a2d |
---|---|
35 num_colors_specified <- length(specified_colors) | 35 num_colors_specified <- length(specified_colors) |
36 if (num_colors_specified < number_comp) | 36 if (num_colors_specified < number_comp) |
37 { | 37 { |
38 for (i in num_colors_specified:number_comp) | 38 for (i in num_colors_specified:number_comp) |
39 { | 39 { |
40 if (!any(specified_colors=='red')) | 40 if (!any(specified_colors == 'red')) |
41 { | 41 { |
42 specified_colors <- c(specified_colors, 'red') | 42 specified_colors <- c(specified_colors, 'red') |
43 } | 43 } |
44 else if (!any(specified_colors=='yellow')) | 44 else if (!any(specified_colors == 'yellow')) |
45 { | 45 { |
46 specified_colors <- c(specified_colors, 'yellow') | 46 specified_colors <- c(specified_colors, 'yellow') |
47 } | 47 } |
48 else if (!any(specified_colors=='green')) | 48 else if (!any(specified_colors == 'green')) |
49 { | 49 { |
50 specified_colors <- c(specified_colors, 'green') | 50 specified_colors <- c(specified_colors, 'green') |
51 } | 51 } |
52 else if (!any(specified_colors=='black')) | 52 else if (!any(specified_colors == 'black')) |
53 { | 53 { |
54 specified_colors <- c(specified_colors, 'black') | 54 specified_colors <- c(specified_colors, 'black') |
55 } | 55 } |
56 else if (!any(specified_colors=='blue')) | 56 else if (!any(specified_colors == 'blue')) |
57 { | 57 { |
58 specified_colors <- c(specified_colors, 'blue') | 58 specified_colors <- c(specified_colors, 'blue') |
59 } | 59 } |
60 else | 60 else |
61 { | 61 { |