Distributions: To Strings...

A command to create a Strings object from every selected Distributions object.

Settings

Column number
the column (in the Distributions object) that contains the distribution that you are interested in. Often the Distributions object will only contain a single distribution, so this argument will often be 1. If the Distributions object contains nine distributions, specify any number between 1 and 9.
Number of strings
the number of times a string will be drawn from the chosen distribution. This is the number of strings that the resulting Strings object is going to contain.

Behaviour

Every string in the resulting Strings object will be a row label of the Distributions object. The number in each row at the specified column will be considered the relative frequency of occurrence of that row.

Example. Suppose we have the following Distributions:

    File type = "ooTextFile"
    Object class = "Distributions"
    2 (number of columns)
             "English" "French" (column labels)
    3 (number of rows)
    "the" 108 1.5
    "a" 58.1 33
    "pour" 0.7 15.5

If you set Column to 1 and Number of strings to 1000, you will get a Strings object with approximately 647 occurrences of “the”, 348 occurrences of “a”, and 4 occurrences of “pour”. If you had set Column to 2 (“French”), you would have gotten about 30 times “the”, 660 times “a”, and 310 times “pour”. The actual numbers will vary because the choice of a string will not depend on previous choices.

Links to this page


© ppgb 19971022