I have a collection of Y’s and N’s. (27 Y and 21 N). I used the random sampler to select 24 values from this collection without replacement. Now, I want to create an attribute that will count the number of Y’s in each sample of 24. I found the count() command. I am just a bit confused as to how this would work. I tried count(value=’Y’) and it returned a value of 0 for all 50 of my samples. And that is definitely not the case.
The count function applies to the cases at the next level. So, as you can see in this screenshot, if you use the formula at the samples level, it does the right thing. Hope that works for you!
This reply was modified 5 years, 1 month ago by Bill Finzer.