stack(hearts)
# set the first landmark as the starting point
stack(coo_slide(hearts, ldk=1))
# set the 50th point as the starting point (everywhere)
stack(coo_slide(hearts, id1=50))
# set the id1-random-th point as the starting point (everywhere)
set.seed(123) # just for the reproducibility
id1_random <- sample(x=min(sapply(hearts$coo, nrow)), size=length(hearts),
replace=TRUE)
stack(coo_slide(hearts, id1=id1_random))
Run the code above in your browser using DataLab