rm_row: Remove Rows That Contain Markers

Description Usage Arguments Value Examples

Description

rm_row - Remove rows from a data set that contain a given marker/term.

rm_empty_row - Removes the empty rows of a data set that are common in reading in data (default method in read.transcript).

Usage

1
2
3
  rm_row(dataframe, search.column, terms)

  rm_empty_row(dataframe)

Arguments

dataframe

A dataframe object.

search.column

Column name to search for markers/terms.

terms

Terms/markers of the rows that are to be removed from the dataframe. The term/marker must appear at the beginning of the string and is case sensitive.

Value

rm_row - returns a dataframe with the termed/markered rows removed.

rm_empty_row - returns a dataframe with empty rows removed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#rm_row EXAMPLE:
rm_row(DATA, "person", c("sam", "greg"))
rm_row(DATA, 1, c("sam", "greg"))
rm_row(DATA, "state", c("Comp"))

#rm_empty_row EXAMPLE:
x <- matrix(rep(" ", 4), ncol =2)
dat <- DATA[, c(1, 4)]
colnames(x) <- colnames(dat)
(dat <- data.frame(rbind(dat, x)))
rm_empty_row(dat)

trinker/qdap2 documentation built on May 31, 2019, 9:47 p.m.