Description Usage Arguments Value Author(s) See Also Examples
Remove all columns or rows from data.frame
matching criterion
1 2 3 4 5 | remove_from(DF, fun, dim = c("both", "rows", "cols"))
remove_from_rows(DF, fun)
remove_from_cols(DF, fun)
|
DF |
|
fun |
|
data.frame
or matrix
with matching removed
Thomas P. Harte
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | FUN<- function(x) is_blank(x) | is.na(x)
tab<- read.table(con<- textConnection(
"Name Age Salary
Dick NA 32k
Tom NA 21k
NA NA NA"
), header=TRUE, colClasses=c("character","integer","character")); close(con)
remove_from_rows(tab, fun=FUN)
remove_from(tab, fun=FUN, dim="row")
remove_from_cols(tab, fun=FUN)
remove_from(tab, fun=FUN, dim="col")
remove_from(tab, fun=FUN, dim="both")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.