drunkenSim: Drunken-Turtle Simulation

View source: R/drunkenSim.R

drunkenSimR Documentation

Drunken-Turtle Simulation

Description

A drunken turtle starts at the origin and takes unit steps, turning through a randdom angle after each step. We are interested in the distribution of the number of close-returns to the origin, for a fixed number of steps and a fixed measure of closeness.

Usage

drunkenSim(steps = 1000, reps = 10000, close = 0.5,
                       seed = NULL, table = FALSE)

Arguments

steps

the number of steps the turtle will take

reps

number of simulations to perform

close

the distance from the origin that counts as "close"

seed

The user may provide a seed-value for random-number generation.

table

Does the user want a table of the results?

Value

side effects

Author(s)

Homer White homerhanumat@gmail.com

Examples

drunkenSim(seed = 3030)

homerhanumat/bcscr documentation built on Jan. 14, 2023, 4 a.m.