assign_bins | R Documentation |
Assign bins for downsampling looking data
assign_bins(
data,
bin_width = 3,
time_var,
...,
bin_col = ".bin",
na_location = "tail",
partial = FALSE
)
data |
a dataframe of looking data |
bin_width |
the number of items to put in each bin. Default is 3. |
time_var |
the name of the column representing time |
... |
grouping variables |
bin_col |
name of the column to add. Defaults to |
na_location |
Where to assign |
partial |
whether to exclude values that don't fit evenly into bins.
Defaults to |
the original dataframe with an added column of bin numbers. The dataframe will be sorted by the grouping and time variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.