From f54dccf30f332a0b975a85bae5f66e9d7cb32978 Mon Sep 17 00:00:00 2001 From: Tyler Date: Thu, 16 Feb 2017 21:24:01 -0500 Subject: [PATCH] updated readme fixed filter_row bug --- DESCRIPTION | 2 +- R/filter_row.R | 2 +- README.md | 21 ++++++++------------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5593984..d11ee7c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,7 +15,7 @@ Depends: R (>= 3.2.3) Imports: english(>= 1.0-2), qdapRegex, stringi, textshape(>= 1.0.1), utils Suggests: testthat, lexicon(>= 0.1.0) -Date: 2017-02-15 +Date: 2017-02-16 License: GPL-2 LazyData: TRUE Roxygen: list(wrap = FALSE) diff --git a/R/filter_row.R b/R/filter_row.R index e900cd4..d8fa5c8 100644 --- a/R/filter_row.R +++ b/R/filter_row.R @@ -32,7 +32,7 @@ filter_row <- function(dataframe, column, terms, ...) { terms <- paste(terms, collapse="|") - if (nrow(dataframe[[column]]) == 0) stop("No columns in the data appear to match supplied `column`") + if (length(dataframe[[column]]) == 0) stop("No columns in the data appear to match supplied `column`") dataframe <- dataframe[!grepl(terms, dataframe[[column]], perl=TRUE, ...), ] rownames(dataframe) <- NULL diff --git a/README.md b/README.md index 827defa..4b3f220 100644 --- a/README.md +++ b/README.md @@ -163,31 +163,26 @@ table below: Replace regex white space characters +replace_token +replacement +Remove or replace a vector of tokens with a single value + + add_comma_space replacement Replace non-space after comma - + add_missing_endmark replacement Replace missing endmarks with desired symbol - -stem_words -stemming -Stem words - -stem_strings -stemming -Stem strings - - check_text check Text report of potential issues - + has_endmark check Check if an element has an end-mark @@ -449,7 +444,7 @@ And if all is well the user should be greeted by a cow: ## ## ------- ## No problems found! - ## You are virtuosic! + ## You are breathtaking! ## -------- ## \ ^__^ ## \ (oo)\ ________