plot_timeSeries {clockSim}R Documentation

Time series plot (multifaceted)

Description

Provides convenience function to plot simulation trajectory of result from one run as time series. Supports plotting multiple states in faceted plot.

Usage

plot_timeSeries(df_result, start_time, end_time, sample_time, tick_time, ...)

Arguments

df_result

Data frame containing results to plot. Must have column $time.

start_time

Plot start time.

end_time

Plot end time.

sample_time

Time interval to subset data.

tick_time

X-axis label break interval time (default 2*sample_time).

...

... <tidy-select> Columns to plot.

Details

Support the following features:

  1. flexible start-end time of the series by start_time and end_time.

  2. row subset of data by a fixed sample_time (useful when time step is small for numerical precision).

  3. flexible time tick label spacing by tick_time.

  4. states to plot are selected by tidy-select.

Please note that this function does not attempt to do exhaustive sanity check of parameters Make sure yourself that parameters make sense (e.g., end-start time must be longer than sample_time and tick_time, etc.)

Value

ggplot object of faceted time series

Examples

vignette("clock-models", "clockSim")

[Package clockSim version 0.1.2 Index]