transform(deprecated)/frequency - Help

Home : Support : Online Help : transform(deprecated)/frequency

stats[transform, frequency]

frequency of each data item

 Calling Sequence stats[transform, frequency](data) transform[frequency](data)

Parameters

 data - statistical list

Description

 • Important: The stats package has been deprecated. Use the superseding package Statistics instead.
 • The function frequency of the subpackage stats[transform, ...] replaces each data point of data by its frequency or weight.
 • The order of the data items is not changed.
 • Statistical data items in a list have a weight, obtained using transform[frequency] and a value, obtained using transform[statvalue]. One can obtained the total frequency, or total weight, using describe[count]. All frequencies in a statistical data list can be changed, proportionally, using the transform[scaleweight].

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

 > $\mathrm{with}\left(\mathrm{stats}\right):$
 > $\mathrm{transform}[\mathrm{frequency}]\left(\left[3\right]\right)$
 $\left[{1}\right]$ (1)
 > $\mathrm{transform}[\mathrm{frequency}]\left(\left[\mathrm{Weight}\left(3,4\right)\right]\right)$
 $\left[{4}\right]$ (2)
 > $\mathrm{transform}[\mathrm{frequency}]\left(\left[3..4\right]\right)$
 $\left[{1}\right]$ (3)
 > $\mathrm{data}≔\left[\mathrm{Weight}\left(3,10\right),\mathrm{missing},4,\mathrm{Weight}\left(11..12,3\right),15..17\right]$
 ${\mathrm{data}}{≔}\left[{\mathrm{Weight}}{}\left({3}{,}{10}\right){,}{\mathrm{missing}}{,}{4}{,}{\mathrm{Weight}}{}\left({11}{..}{12}{,}{3}\right){,}{15}{..}{17}\right]$ (4)
 > $\mathrm{transform}[\mathrm{frequency}]\left(\mathrm{data}\right)$
 $\left[{10}{,}{1}{,}{1}{,}{3}{,}{1}\right]$ (5)