Description Usage Arguments Value See Also Examples
Generate factors by specifying the pattern of their levels.
1 |
n |
an integer giving the number of levels. |
k |
an integer giving the number of replications. |
length |
an integer giving the length of the result. |
labels |
an optional vector of labels for the resulting factor levels. |
ordered |
a logical indicating whether the result should be ordered or not. |
The result has levels from 1
to n
with each value
replicated in groups of length k
out to a total length of
length
.
gl
is modelled on the GLIM function of the same name.
The underlying factor()
.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.