R/utils.R

Defines functions move_xy

# this function moves the coordinates to the first two variables of the df:
move_xy <- function(df) {
  nc <- ncol(df)
  sel <- c(nc - 1, nc)
  cbind(df[, sel], df[, -sel])
}
choisy/sptools documentation built on Aug. 22, 2019, 12:57 p.m.