Random routes using map

Hello folks,

I want to use random route instructions on city maps. For example, the statement "left, right, left, right, ...." should be simulated at every possible starting point.
If necessary, the selection probabilities of the households should then be calculated.
Do yall know of any packages that could help?

Thanks!

We probably need more information but if all you need is a vector of left and right then this should do:

sample(c("left", "right"), 100,  replace = TRUE)