library(ggplot2)
set.seed(123)
walks <- random_normal_drift_walk(.num_walks = 10, .n = 50, .mu = 0, .sd = 1.2,
.drift = 0.05)
ggplot(walks, aes(x = x, y = y, group = walk_number, color = walk_number)) +
geom_line() +
labs(title = "Random Walks with Drift", x = "Time", y = "Value") +
theme_minimal() +
theme(legend.position = "none")
Run the code above in your browser using DataLab