R/invert_bits.R

Defines functions invert_bits

Documented in invert_bits

#' A function to invert the values in a data frame or matrix
#' 
#' This function replaces 0s with 1s and 1s with 0s in a dataframe or matrix
#' 
#' @param input_data gamete alleles
#' 
#' @return input_data inverted from the actual input
#' 
invert_bits <- function(input_data) {
  return(abs(input_data-1))
}
mccoy-lab/rhapsodi documentation built on July 27, 2022, 3:56 a.m.