You’re looking for expand.grid
.
expand.grid(0:1, 0:1, 0:1)
Or, for the long case:
n <- 14
l <- rep(list(0:1), n)
expand.grid(l)
More Related Contents:
- How to generate permutations or combinations of object in R?
- Removing duplicate combinations (irrespective of order)
- Generating all distinct permutations of a list in R
- Table of Interactions – Case with pets and houses
- Unordered combinations of all lengths
- Faster version of combn
- How to calculate combination and permutation in R?
- How to randomize (or permute) a dataframe rowwise and columnwise?
- Non-redundant version of expand.grid
- Generating all permutations of N balls in M bins
- Combinations by group in R
- Combinations of multiple vectors in R
- Combining paste() and expression() functions in plot labels
- using stat_function and facet_wrap together in ggplot2 in R
- Can dplyr summarise over several variables without listing each one? [duplicate]
- How to install development version of R packages github repository
- Read a UTF-8 text file with BOM
- How to GeoCode a simple address using Data Science Toolbox
- R Shiny REST API communication
- ggplot – Multiple legends arrangement
- Extract string before “|” [duplicate]
- How do I copy and paste data into R from the clipboard?
- How `poly()` generates orthogonal polynomials? How to understand the “coefs” returned?
- Remove facet_wrap labels completely
- R: sample() command subject to a constraint
- Duplicate list names in R
- how can I handle vectors without knowing the type in Rcpp
- Adding a counter column for a set of similar rows in R [duplicate]
- R data table: update join
- Importing “csv” file with multiple-character separator to R?