Arguments
depth
Scalar indicating depth of reach, see Markowitz (2005). depth
is an integer, greater than or equal to 1;
non-integer values are coerced using floor(depth)
.
keep
Scalar indicating the number of combinations of each size to keep in the output object generated by turf
.
keep
is an integer, greater than or equal to zero; non-integer values are coerced using floor(keep)
. If
keep
== 0 (default), all combinations evaluated by the TURF algorithm are kept; if keep
>= 1, the lesser
of keep
or the number of evaluated combinations of a given size are kept.
mc
Logical indicating whether or not Monte Carlo simulated subsets of combinations should be substituted for all possible
combinations of n choose k or user-specified combinations. When TRUE, subsets are generated using the method described
by Adler, et al. (2010), only when nsims
is also less than n choose k or the number of user-specified
combinations.
nsims
Scalar indicating the number of combination sets of a given size to generate when mc
== TRUE. nsims
is an
integer, greater than or equal to 1; non-integer values are coerced using floor(nsims)
. This argument is ignored when
mc
== FALSE.
psims
Vector of length n indicating the probabilities of sampling each item into a combination set when mc
==
TRUE. Probabilities need not sum to 1 (see sample
for additional details). All values must be greater than or equal to 0;
for combinations of size k, there must be at least k non-zero values in psims
. Default varies depending on
calling function; when called from turf
, default is the probability of each item being reached; when called from
turf.combos
, default is rep(1/n, n)
. psims
is ignored when mc
== FALSE.
sort
Character indicating sort order of TURF output: "d" (default) causes combinations to be sorted in descending order of
reach, then frequency; "a" causes combinations to be sorted in ascending order of reach, then frequency; "n" leaves combinations
unsorted (i.e., they remain in the same order as the rows in each element of combos
). sort
is executed before
keep
. When sort
== "n", keep
is ignored (i.e., all combinations evaluated are kept in the output). No other
values are permitted.