random_steps: Generate Random Steps

Description Usage Arguments

View source: R/random_steps.R

Description

Function to generate a given number of random steps for each observed step.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
random_steps(x, ...)

## S3 method for class 'numeric'
random_steps(
  x,
  n_control = 10,
  angle = 0,
  rand_sl = random_numbers(make_exp_distr(), n = 1e+05),
  rand_ta = random_numbers(make_unif_distr(), n = 1e+05),
  ...
)

## S3 method for class 'steps_xy'
random_steps(
  x,
  n_control = 10,
  sl_distr = fit_distr(x$sl_, "gamma"),
  ta_distr = fit_distr(x$ta_, "vonmises"),
  rand_sl = random_numbers(sl_distr, n = 1e+05),
  rand_ta = random_numbers(ta_distr, n = 1e+05),
  include_observed = TRUE,
  ...
)

Arguments

x

Steps.

...

Further arguments, none implemented.

n_control

[integer(1)=10]{>1}
The number of control steps paired with each observed step.

angle

[numeric(1) = 0]{-pi < rel_angle < pi}
Angle for the first step.

rand_sl

[numeric]
Numeric vector with random step lengths an animal can make. This will usually be random numbers drawn from a suitable distribution (e.g., gamma or exponential).

rand_ta

[numeric]
Numeric vector with relative turning angles an animal can make. This will usually be random numbers drawn from a suitable distribution (e.g., von Mises or uniform).

sl_distr

[amt_distr]
The step-length distribution.

ta_distr

[amt_distr]
The turn-angle distribution.

include_observed

[logical(1) = TRUE]
Indicates if observed steps are to be included in the result.


amt documentation built on Jan. 18, 2021, 5:05 p.m.