Description Usage Arguments Value Examples
Use regexp matching to remove columns from a data frame
1 | removeCols(df, match_string)
|
df |
is a data frame |
match_string |
is a string for grepl matching |
.df with columns matched by .match_string removed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | > test <- data.frame(x = c(1,2,3),
y = c(4,5,6),
xa = c(7,8,9),
apple = c(5,5,5))
> removeCols(test, "x")
y apple
1 4 5
2 5 5
3 6 5
> removeCols(test, "x|a")
y
1 4
2 5
3 6
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.