Nothing
#' Removes rows with more than thresh NA's from matrix
#' @export
#' @return matrix
#' @param obj matrix or dataframe
#' @param thresh - maximum number of NA's / row - if more the row will be removed
#' @examples
#'
#' x = matrix(rnorm(10*10),ncol=10)
#' dim(x)
#' x[3,3] = NA
#' x = removeNArows(x)
#' dim(x)
removeNArows <- function(obj, thresh=0 )
{
x <- apply(obj,1,function(x){sum(is.na(x))})
obj <- obj[-which(x>thresh),]
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.