generate_interactive_plot {MIMSunit}R Documentation

Plot MIMS unit values or raw signal using dygraphs interactive plotting library.

Description

generate_interactive_plot plots MIMS unit values or raw signal using dygraphs interactive plotting library.

Usage

generate_interactive_plot(df, y_label, value_cols = c(2, 3, 4))

Arguments

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)'.

Value

A dygraphs graph object. When showing, the graph will be plotted in a html widgets in an opened browser.

See Also

Other visualization functions.: illustrate_extrapolation(), illustrate_signal()

Examples

  # 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))

[Package MIMSunit version 0.11.2 Index]