R/strip_units.R

Defines functions strip_units

Documented in strip_units

#' @title
#' Remove units from object
#'
#' @description
#' \code{strip_units} facilitates logical comparisons and other generic operators by stripping units from an object but otherwise leaving it unchanged
#'
#' @export
strip_units = function(x){
  if("units" %in% class(x)) units(x) = NULL
  return(x)
}
James-Thorson/FishStatsUtils documentation built on Feb. 6, 2024, 4:26 a.m.