cut_int | R Documentation |
n
chunksThis function is intended for things like dividing large datasets into n
chunks
with a more-or-less equal number of rows in each chunk. Useful for generating batch
files.
cut_int(int, chunks = NULL)
int |
(Integer) The number to divide. |
chunks |
(Integer) The number of chunks to divide it into. |
A tibble with four columns: chunk
, which is the chunk's number, left
,
which is the start of each chunk, right
, which is its end, and size
, which
is how many items are in the chunk.
Desi Quintans (http://www.desiquintans.com)
cut_int(19.4e6, 9)
# # A tibble: 9 × 4
# chunk left right size
# <int> <dbl> <dbl> <dbl>
# 1 1 2155557 2155557
# 2 2155558 4311112 2155555
# 3 4311113 6466668 2155556
# 4 6466669 8622223 2155555
# 5 8622224 10777779 2155556
# 6 10777780 12933334 2155555
# 7 12933335 15088890 2155556
# 8 15088891 17244445 2155555
# 9 17244446 19400000 2155555
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.