get_probing_data: Get Probing Data

Description Usage Arguments Value Examples

View source: R/probing.R

Description

Get Probing Data

Usage

1
2
3
4
5
6
7
get_probing_data(
  args_list,
  probe_func = function(...) { },
  change_ratio = seq(0.8, 1.2, length.out = 100),
  aggregate = "raw",
  ...
)

Arguments

args_list

Named list with initial arguments to be passed to probe_func

probe_func

Function that returns a list of outputs

change_ratio

Numeric vector indicating the probing initial arguments in args_list

aggregate

String. Indicates how should output from probe_func be aggregated. Default is "raw". Other options involve "diff" and "ratio". To calculate "diff" and "ratio" aggregate, probe_func output using the initial argument values in args_list is used

...

Extra arguments for probe_func that are not probed using change_ratio

Value

Data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
require(ggplot2)
fgen_probe_data <- get_probing_data(
  args_list = list(current_time = 0.3, current_distance = 0.1, current_velocity = 0),
  probe_func = function(...) {
    fgen_get_output(...)
  }, aggregate = "raw",
  mass = 70, max_force = 5000
)

ggplot(
  fgen_probe_data,
  aes(
    x = change_ratio,
    y = kinetics.ground_reaction_force,
    color = probing
  )
) +
  geom_line()

mladenjovanovic/vjsim documentation built on Aug. 7, 2020, 10:10 p.m.