phsmethods icon indicating copy to clipboard operation
phsmethods copied to clipboard

Function to replace NaN values.

Open Nic-Chr opened this issue 3 years ago • 1 comments

Simple function to replace NaN values, similarly named to tidyr::replace_na().

replace_nan <- function(x, value){
  x[is.nan(x)] <- value
  x
}

Nic-Chr avatar Jun 14 '21 11:06 Nic-Chr