View source: R/random.intervals.R
random.intervals | R Documentation |
The function generates M
intervals of the length smaller or equal than max.length
, whose endpoints are
are drawn uniformly without replacements from 1
,2
,..., n
. This routine can be
used inside not
function and is typically not called directly by the user.
random.intervals(n, M, min.length = 1, max.length = n, ...)
n |
a number of endpoints to choose from |
M |
a number of intervals to generate |
min.length |
an integer specifying minimum interval length |
max.length |
an integer specifying maximum interval length |
... |
not in use |
a M
by 2 matrix with start (first column) and end (second column) points of an interval in each row
not
#*** draw 100 intervals with the endpoints in 1,...,100 intervals <- random.intervals(50, 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.