R/rmNArows.R

Defines functions rmNArows

Documented in rmNArows

#' rmNArows
#'
#' Get rid of rows from a data frame that are entirely NA
#'
#' @param d the data frame you want to filter
#' @return filtered x data frame
#' @export
#'
rmNArows<-function(d){
  goodRows<-apply(d,1,function(x) sum(is.na(x))!=ncol(d))
  d[goodRows,]
}
galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.