View source: R/functions_velocity.R
plot_velocity_bins | R Documentation |
Title
plot_velocity_bins(velocity_dt, bins = 36, bin_FUN = sum)
velocity_dt |
data.table with angle and distance info. |
bins |
number of bins to use when summarizing changes. |
bin_FUN |
function to apply per bin to summarize. will be passed a numeric vector and must return single value. Suggested methods are length, sum, mean, and median. |
a ggplot with a polar coordinate barplot.
data("tsne_dt") vel_dt = prep_velocity( tsne_dt, unique(tsne_dt$tall_var)[1], unique(tsne_dt$tall_var)[2] ) plot_velocity_bins(vel_dt, bins = 18, bin_FUN = sum) plot_velocity_bins(vel_dt, bins = 8, bin_FUN = median)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.