library(partitions)
compositions(3,4)
# [1,] 3 2 1 0 2 1 0 1 0 0 2 1 0 1 0 0 1 0 0 0
# [2,] 0 1 2 3 0 1 2 0 1 0 0 1 2 0 1 0 0 1 0 0
# [3,] 0 0 0 0 1 1 1 2 2 3 0 0 0 1 1 2 0 0 1 0
# [4,] 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 3
More Related Contents:
- Generating all distinct permutations of a list in R
- How to generate permutations or combinations of object in R?
- Generate list of all possible combinations of elements of vector
- How to randomize (or permute) a dataframe rowwise and columnwise?
- Generate multiple graphics from within an R function
- Explain a lazy evaluation quirk
- Tools for making latex tables in R [closed]
- How can I count runs in a sequence?
- What does the dot mean in R – personal preference, naming convention or more?
- Add a row by reference at the end of a data.table object
- in R, use gsub to remove all punctuation except period
- Saving multiple ggplots from ls into one and separate files in R
- Importing two functions with same name using roxygen2
- plots generated by ‘plot’ and ‘ggplot’ side-by-side
- Change day of the month in a Date to first day (01)
- Issue involving map generation in shiny
- Recode categorical variable to binary (0/1)
- Getting strings recognized as variable names in R
- Sparklyr: how to center a Spark table based on column?
- data.table equivalent of tidyr::complete()
- MATCH function in r [duplicate]
- How to get ranks with no gaps when there are ties among values?
- Improve centering county names ggplot & maps
- How to find the indices of the top 10,000 elements in a symmetric matrix(12k X 12k) in R
- Using data.table i and j arguments in functions
- How to assign from a function with multiple outputs? [duplicate]
- How can I automatically create n lags in a timeseries?
- Plotting pca biplot with ggplot2
- Stop an R program without error
- How to get a barplot with several variables side by side grouped by a factor