| generate_interactive_plot | R Documentation |
generate_interactive_plot plots MIMS unit values or raw signal
using dygraphs interactive plotting library.
generate_interactive_plot(df, y_label, value_cols = c(2, 3, 4))
df |
data.frame.The dataframe storing MIMS unit values or raw accelerometer signal. The first column should be timestamps. |
y_label |
str. The label name to be put on the y axis. |
value_cols |
numerical vector. The indices of columns storing values, typically starting from the second column. The default is 'c(2,3,4)'. |
A dygraphs graph object. When showing, the graph will be plotted in a html widgets in an opened browser.
Other visualization functions.:
illustrate_extrapolation(),
illustrate_signal()
# Use sample data for testing
df = sample_raw_accel_data
# Plot using default settings, due to pkgdown limitation, no interactive
# plots will be shown on the website page.
generate_interactive_plot(df,
y_label="Acceleration (g)")
# The function can be used to plot MIMS unit values as well
mims = mims_unit(df, dynamic_range=c(-8, 8))
generate_interactive_plot(mims,
y_label="MIMS-unit values",
value_cols=c(2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.