plot_sim: plot_sim

Description Usage Arguments Value Examples

View source: R/sim_data.R

Description

Visualize a long data.table such as the one generated by multi_sims.

Usage

1
2
plot_sim(data, x = "Time", y = "value", group = "variable",
  use.facet = T, facet = "noise", alpha = 0.2, plot = T)

Arguments

data

data.table in long format

x

column name of x axis (typically time)

y

column name of y axis (typically measurements)

group

column name of grouping (typically ID of a trajectory)

use.facet

logical, if TRUE use facet to give a second grouping.

facet

column name of second grouping for facetting

alpha

numeric, set transparency of curves

plot

logical, whether to plot the output

Value

A ggplot object.

Examples

1
2
x <- multi_sims(type = "ps", noises = seq(0.5, 2, 0.5), n = 10, freq = 0.5, end = 30)
plot_sim(x)

majpark21/TSexploreR documentation built on Oct. 16, 2019, 2:46 p.m.