Learn R Programming

healthcareai (version 1.2.4)

createAllCombinations: Find all possible unique combinations

Description

For a given vector of, find all possible combinations of the values. When calculating, if two groups contain the same values, they are counted as the same if they only differ in terms of ordering.

Usage

createAllCombinations(vector)

Arguments

vector

A vector of strings or numbers.

Value

A list of sub-lists. Each sub-list represents one possible combination.

References

http://healthcareai-r.readthedocs.io

See Also

healthcareai findVariation createVarianceTallTable

Examples

Run this code
# NOT RUN {
vector <- c("LactateOrderHospital",
                  "LactateOrderProvSpecialtyDSC",
                  "LactateOrderProvNM")
res <- createAllCombinations(vector)

# Let's look at one possible combination
unlist(res[3])

# Look at all possible combinations
res
# }

Run the code above in your browser using DataLab