Description Usage Arguments Value Examples

View source: R/observation_method_filters.R

Evaluates the presence or absence of the behavior at fixed moments in time.

1 | ```
momentary_time_recording(BS, interval_length, summarize = TRUE)
``` |

`BS` |
object of class behavior_stream |

`interval_length` |
length of interval between moments. |

`summarize` |
logical value indicating whether vector of moments should be summarized by taking their mean. |

If `summarize = FALSE`

, a matrix with length `n_intervals + 1`

and width equal to the number
of behavior streams in `BS`

. If `summarize = TRUE`

, a vector of proportions of length equal to the
number of behavior streams in `BS`

. Note that if `summarize = TRUE`

, the initial state of the
behavior stream is excluded when calculating the mean, so the proportion is based on `n_intervals`

values.

1 2 3 4 5 | ```
BS <- r_behavior_stream(n = 5, mu = 3, lambda = 10,
F_event = F_exp(), F_interim = F_exp(), stream_length = 100)
momentary_time_recording(BS, interval_length = 20, FALSE)
momentary_time_recording(BS, interval_length = 20)
colMeans(momentary_time_recording(BS, 20, FALSE)[-1,])
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.