R/delete.na.R
delete.na.Rd
In many situations it is required to omit the rows or columns less or greater with NA of the matrix.
delete.na(x, alternative = c("less", "greater"))
x | matrix with NA |
---|---|
alternative | "less" or "greater" |
matrix
#> [,1] [,2] [,3] #> [1,] 2 5 4 #> [2,] 5 NA 3 #> [3,] 3 8 NA #> [4,] 7 0 NA# [,1] [,2] [,3] #[1,] 2 5 4 #[2,] 5 NA 3 #[3,] 3 8 NA #[4,] 7 0 NA delete.na(x,"less")#> [,1] #> [1,] 2 #> [2,] 5 #> [3,] 3 #> [4,] 7# [,1] #[1,] 2 #[2,] 5 #[3,] 3 #[4,] 7 delete.na(x,"greater")#> [,1] [,2] [,3] #> [1,] 2 5 4# [,1] [,2] [,3] #[1,] 2 5 4