R/RemoveRowsWithNaNs.R

Defines functions sumisna RemoveRowsWithNaNs

Documented in RemoveRowsWithNaNs

RemoveRowsWithNaNs <- function(x, cols=NULL) {
  p=dim(x)[2]
  if (is.null(cols))
    cols=1:p
  sumas=apply(x[, cols],1,sumisna)
  good=which(sumas==0)
  newx=x[good,]
  return(newx)
}

sumisna <- function(x){
  return(sum(is.na(x)))
}

Try the MultBiplotR package in your browser

Any scripts or data that you put into this service are public.

MultBiplotR documentation built on Nov. 21, 2023, 5:08 p.m.