-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcombinadic.Rd
38 lines (36 loc) · 901 Bytes
/
combinadic.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auxiliar.R
\name{combinadic}
\alias{combinadic}
\title{i-th combination of n elements taken from r}
\usage{
combinadic(n, r, i)
}
\arguments{
\item{n}{Elements to extract the combination from}
\item{r}{Number of elements per combination}
\item{i}{ith combination}
}
\value{
The combination ith of the elements
}
\description{
Function similar to combn but for larger vectors. To avoid allocating a big
vector with all the combinations each one can be computed with this
function.
}
\examples{
# Output of all combinations
combn(LETTERS[1:5], 2)
# Otuput of the second combination
combinadic(LETTERS[1:5], 2, 2)
}
\references{
\href{http://stackoverflow.com/a/4494469/2886003}{StackOverflow answer 4494469/2886003}
}
\seealso{
\code{\link[=combn]{combn()}}
}
\author{
Joshua Ulrich
}