R/factorise.R

#' find divisors of an integer
#'
#' @export
factorise <- function(x) {
  x <- as.integer(x)
  y <- seq_len(abs(x))
  y[x %% y == 0L]
}
PietaSchofield/pietalib documentation built on May 8, 2019, 3:18 a.m.