setMaxProblemSize | R Documentation |
Helper function to ease setting the largest problem size to be
accepted by pairmatch
or fullmatch
.
setMaxProblemSize(size = Inf)
size |
Positive integer, or |
The function sets the optmatch_max_problem_size global option. The
option ships with the option pre-set to a value that's relatively small,
smaller than what most modern computers can handle. Invoking this
function with no argument
re-sets the optmatch_max_problem_size option to Inf
, effectively
disabling checks on problem size. Unless you're working with an older
computer, it probably makes sense for most users to do this, at least
until they determine what problem sizes are too large for their machines.
(You'll know that when your R crashes, or simply takes too long for
your taste.)
To determine the size of a problem without subproblems, i.e. exact
matching categories, use match_on
to set up and store
the problem distance, then apply length
to the result. If
there were exact matching constraints imposed during the creation
of the distance, then you'll want to look at the largest size of a
subproblem. Apply findSubproblems
to your distance,
creating a list, say dlist
, of your distances; then do
sapply(dlist, length)
to determine the sizes of the subproblems.
Ben B. Hansen
getMaxProblemSize
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.