Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

random_steps

Generate Random Steps


Description

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

Usage

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

Animal Movement Tools

v0.1.4
GPL-3
Authors
Johannes Signer [aut, cre], Brian Smith [ctb], Bjoern Reineking [ctb], Ulrike Schlaegel [ctb], John Fieberg [ctb], Scott LaPoint [dtc]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.