Use a Slider to Compute Things Based on a Collection

Top  Previous  Next

How To... > Work with Dynamic Parameters (Sliders) > Use a Slider to Compute Things Based on a Collection

colltoslider

There are times when you want measures computed for a collection to be accessible throughout the document. For example, suppose you have measured the weights of a bunch of butterfly cocoons, and you want the mean and standard deviation of those weights to be used to generate simulated weights from a normal distribution. You can use sliders to calculate the values you need and then refer to those sliders in any formula in the document.

Here’s how:

1.Drag the name of the collection from the collection to the slider and release.

The slider will acquire a thick black border indicating that you can drop there.

2.Choose Edit | Edit Formula.
3.Enter a formula that refers to an attribute in the collection, such as mean(weight).
4.Edit the slider name to reflect its use.

_img408

Now you can refer to this slider in other situations. For example, in a dot plot of simulated cocoon weights, you could plot values to compare the actual mean cocoon weight with the mean of the simulated weights.

_img409