Skip to contents

The goal of RandomWalker is to allow users to easily create Random Walks of different types that are compatible with the tidyverse suite of packages. The package is currently in the experimental stage of development.

Installation

You can install the released version of {TidyDensity} from CRAN with:

install.packages("RandomWalker")

You can install the development version of RandomWalker from GitHub with:

# install.packages("devtools")
devtools::install_github("spsanderson/RandomWalker")

Example

This is a basic example which shows you how to solve a common problem:

library(RandomWalker)
## basic example code
rw30() |>
  head(10)
#> # A tibble: 10 × 3
#>    walk_number     x      y
#>    <fct>       <int>  <dbl>
#>  1 1               1  0    
#>  2 1               2 -1.82 
#>  3 1               3 -2.48 
#>  4 1               4 -2.29 
#>  5 1               5 -1.34 
#>  6 1               6 -0.373
#>  7 1               7  0.287
#>  8 1               8  0.495
#>  9 1               9  0.493
#> 10 1              10  1.23

Here is a basic visualization of a Random Walk: