Description Usage Arguments Value Examples
filter_row
- Remove rows from a data set that contain a given marker/term.
filter_empty_row
- Removes the empty rows of a data set that are common in
reading in data.
filter_NA
- Removes the NA
rows of a data set.
1 2 3 4 5 | filter_row(dataframe, column, terms, ...)
filter_empty_row(dataframe)
filter_NA(dataframe, column = TRUE, ...)
|
dataframe |
A dataframe object. |
column |
Column name to search for markers/terms. |
terms |
The regex terms/markers of the rows that are to be removed from the dataframe. |
... |
Other arguments passed to |
filter_row
- returns a dataframe with the termed/markered rows
removed.
filter_empty_row
- returns a dataframe with empty rows removed.
filter_NA
- returns a dataframe with NA
rows removed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
## filter_row EXAMPLE:
filter_row(DATA, "person", c("sam", "greg"))
filter_row(DATA, 1, c("sam", "greg"))
filter_row(DATA, "state", c("Comp"))
filter_row(DATA, "state", c("I "))
filter_row(DATA, "state", c("you"), ignore.case=TRUE)
## filter_empty_row EXAMPLE:
(dat <- rbind.data.frame(DATA[, c(1, 4)], matrix(rep(" ", 4),
ncol =2, dimnames=list(12:13, colnames(DATA)[c(1, 4)]))))
filter_empty_row(dat)
## filter_NA EXAMPLE:
DATA[1:3, "state"] <- NA
filter_NA(DATA)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.