## In this example, we generate random driving directions. ## At every intersetion we can turn left, right or go straight. ## Driving directions x <- c("L","R","S") ## The number of turns n <- 4 ## Generate choice of direction ## This generages arbitrary n-tuples. path <- sample(x, n, replace=TRUE) ## Print the generated path print(path)