TrimNA | R Documentation |
Remove leading and trailing rows of all NA
TrimNA(m, trim = c("all", "any"))
m |
a numeric matrix, data.frame or vector |
trim |
trim leading and trailing rows of "all" NA or containing "any" NA values |
a numeric matrix, data.frame or vector
m <- matrix(c(NA, NA, NA, 1, NA, NA, NA, 1, 1, NA, NA, NA, 1:9, NA,NA,NA, 10:12, NA, 1, NA, NA,NA,NA), ncol = 3, byrow = TRUE)
m
TrimNA(m)
TrimNA(m, trim = "any")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.