ncomb {dvir} | R Documentation |
The number of assignments for DVI problem
Description
The number of victims and missing persons of each sex is given. The number of possible assignments, i.e., the number of ways the victims can be identified with the missing persons, is calculated.
Usage
ncomb(nVfemales, nMPfemales, nVmales, nMPmales)
Arguments
nVfemales |
Integer. The number of female victims. |
nMPfemales |
Integer. The number of female missing persons. |
nVmales |
Integer. The number of male victims. |
nMPmales |
Integer. The number of male missing persons. |
Value
The total number of possible assignments.
Examples
# Example
m1 = ncomb(5,5,5,5) #
# Example: 3 male victims; 2 male missing persons.
# The number of a priori possible assignments is
m1 = ncomb(0,0,3,2) # 13
# Compare with the complete list of assignments
m2 = expand.grid.nodup(list(V1 = c("*", "M1", "M2"),
V2 = c("*", "M1", "M2"),
V3 = c("*", "M1", "M2")))
stopifnot(m1 == nrow(m2))
[Package dvir version 3.2.1 Index]