A random walk simulation written in R where the direction is chosen at random using runif(). An optional time argument that must be an integer can be supplied for the desired number of steps. The default is 10,000 as to optimize speediness while still creating enough points, but more or fewer steps will also work. The color gradient for the graph and the step size can also be optionally inputted.
The random_walk() function returns a plot of the change in position of a randomly walking object over time.