powered by
This function will remove any rows from a data frame or matrix that contain certain values
RemoveFromTable(to.remove, data)
A vector of values that indicate removal
A data frame or matrix
A data frame or matrix with values removed by row
# NOT RUN { df <- data.frame( x = rnorm(n = 100, mean = 20, sd = 2), y = rbinom(n = 100, size = 100, prob = 0.2) ) nrow(x = df) nrow (x = RemoveFromTable(to.remove = 20, data = df)) # }
Run the code above in your browser using DataLab