R/gen_points.R

Defines functions gen_points

#' @import dplyr
gen_points <- function(table=2,modulo=10,r=1){

circleFun(c(0, 0), r, npoints = modulo) %>%
    mutate(depart = seq_len(nrow(.)),
           destination = (depart * table) %% nrow(.),
           destination = case_when(destination == 0 ~ as.numeric(nrow(.)),
                                   TRUE ~ destination)
    )


}

Try the rusk package in your browser

Any scripts or data that you put into this service are public.

rusk documentation built on May 1, 2019, 7:49 p.m.