Number from Column
The Number from Column global variable allows you to extract values or summary statistics from a column of data.
When you create a Number from Column variable, you have to specify the column of data you want to use and the type of value you want to display.
How to Create
Manual Method
Click the Other menu in the variables section at the bottom of the data side panel. Select Number from Column from the list.
This will create the variable with a red dot in the corner.
Select a column, what you want to output, and name the variable. The value that the variable returns is shown to the right of the name.
Quick Create
For a shortcut, click the gear menu on a column object and select from the menu what you want to calculate (sum, max, min, … ).
Or you can also control-clicking (right-click) on a column header in the data table.
Either approach will automatically create the variable, populate the menus, and enter a name.
Display in a Graph
To display in a graph, click the “+” symbol to the right of any text entry box and select from the drop-down menu. This will add a token.
Output
Use the What menu to specify the value you want to derive or return.
Name | Description |
sum | sum of all values in a column |
sum of ^2 | sum of the squares of the values |
max | maximum of a column |
min | minimum of the column |
max | maximum of a column |
range | maximum minus the minimum |
count | Number of non-empty rows |
# of rows | Total number of rows (including empty) |
mean | Mean of the column |
median | Median of the column |
σ | Population Standard deviation |
s | Sample Standard deviation (unbiased estimate of σ) |
sem | Standard error of the mean |
At index … | Return a value from a specific row |
At Index …
You can also extract a single numeric value from a row by specifying the index for the row. This feature can be useful for animations or scrubbing through a data set with a slider.
To use, set the index to a slider variable and restrict that to an integer.
Then the slider could be used to scrub through the rows.
Notice how the value changes when we move the slider.