count(expression, filter) question

CODAP Forums CODAP Help Forum count(expression, filter) question

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1135 Score: 0

    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.

    Any help would be appreciated.

    #1136
    Bill Finzer
    Keymaster

    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 4 years, 5 months ago by Bill Finzer.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.