R/ind.R

Defines functions ind

Documented in ind

#' Individualize function
#'
#' @param data dataset you want to add "individual" column to
#'
#' @return The original output plus a row number variable
#' @export
#'
#' @examples
#' ind(iris)
ind <- function(data){
  data$individual <- seq(1:nrow(data))
  #I chose the name individual because it is long and rarely used
  nombre <- data[,c(length(data),seq(1:(length(data)-1)))]
  return(nombre)
}
maedhays/missingdata581 documentation built on Dec. 21, 2021, 12:52 p.m.