chunk_data_frame | R Documentation |
Use chunk_by_id to split up a data set by the ID
column; use
chunk_by_row split a data set by rows.
chunk_by_id(data, nchunk, id_col = "ID", mark = NULL) chunk_by_cols(data, nchunk, cols, mark = NULL) chunk_by_row(data, nchunk, mark = NULL)
data |
A data frame. |
nchunk |
The number of chunks. |
id_col |
Character name specifying the column containing the |
mark |
When populated as a character label, adds a column to the chunked data frames with that name and with value the integer group number. |
cols |
A character vector of columns to use for deriving |
A list of data frames.
x <- expand.grid(ID = 1:10, B = rev(1:10)) chunk_by_id(x, nchunk = 3) chunk_by_row(x, nchunk = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.