Skip to content

Commit

Permalink
Fixed some remaining problems with lnt_sample()
Browse files Browse the repository at this point in the history
  • Loading branch information
JBGruber committed Jul 9, 2019
1 parent 260a3c0 commit 29b62e2
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2019-07-09.
Once it is accepted, delete this file and tag the release (commit 808674d01f).
Once it is accepted, delete this file and tag the release (commit 260a3c04e1).
23 changes: 13 additions & 10 deletions R/LexisNexisTools.R
Original file line number Diff line number Diff line change
Expand Up @@ -645,17 +645,17 @@ lnt_read <- function(x,
#' @importFrom stats na.omit
#' @importFrom stringi stri_extract_all_regex stri_join
#' @examples
#'
#' \dontrun{
#' # Copy sample file to current wd
#' lnt_sample()
#'
#' # Rename files in current wd and report back if successful
#' \dontrun{
#'
#' report.df <- lnt_rename(
#' recursive = FALSE,
#' report = TRUE
#' )
#' }
#'
#'
#' # Or provide file name(s)
#' my_files <- list.files(
Expand All @@ -672,6 +672,7 @@ lnt_read <- function(x,
#' report.df <- lnt_rename(x = getwd())
#'
#' report.df
#' }
lnt_rename <- function(x,
encoding = "UTF-8",
recursive = FALSE,
Expand Down Expand Up @@ -846,11 +847,13 @@ lnt_rename <- function(x,
#' @importFrom quanteda dfm docnames textstat_simil
#' @importFrom utils combn
#' @examples
#' \dontrun{
#' # Copy sample file to current wd
#' lnt_sample()
#' }
#'
#' # Convert raw file to LNToutput object
#' LNToutput <- lnt_read(lnt_sample())
#' LNToutput <- lnt_read(lnt_sample(copy = FALSE))
#'
#' # Test similarity of articles
#' duplicates.df <- lnt_similarity(
Expand Down Expand Up @@ -1044,7 +1047,7 @@ lnt_similarity <- function(texts,
#' @export
#'
#' @examples
#' LNToutput <- lnt_read(lnt_sample(), convert_date = FALSE)
#' LNToutput <- lnt_read(lnt_sample(copy = FALSE), convert_date = FALSE)
#' d <- lnt_asDate(LNToutput@meta$Date)
#' d
#' @importFrom stringi stri_replace_all_fixed stri_replace_all_regex
Expand Down Expand Up @@ -1195,7 +1198,7 @@ lnt_asDate <- function(x,
#'
#' @examples
#' # Make LNToutput object from sample
#' LNToutput <- lnt_read(lnt_sample())
#' LNToutput <- lnt_read(lnt_sample(copy = FALSE))
#'
#' # Lookup keywords
#' LNToutput@meta$Keyword <- lnt_lookup(
Expand Down Expand Up @@ -1309,7 +1312,7 @@ lnt_lookup <- function(x,
#' @examples
#' # Test similarity of articles
#' duplicates.df <- lnt_similarity(
#' LNToutput = lnt_read(lnt_sample()),
#' LNToutput = lnt_read(lnt_sample(copy = FALSE)),
#' threshold = 0.97
#' )
#'
Expand Down Expand Up @@ -1400,7 +1403,7 @@ lnt_diff <- function(x,
#' * lnt2SQLite ... passed on to [RSQLite::dbWriteTable()].
#'
#' @examples
#' LNToutput <- lnt_read(lnt_sample())
#' LNToutput <- lnt_read(lnt_sample(copy = FALSE))
#'
#' docs <- lnt_convert(LNToutput, to = "rDNA")
#'
Expand Down Expand Up @@ -1748,7 +1751,7 @@ lnt2SQLite <- function(x, file = "LNT.sqlite", ...) {
#' @export
#'
#' @examples
#' LNToutput <- lnt_read(lnt_sample())
#' LNToutput <- lnt_read(lnt_sample(copy = FALSE))
#'
#' bib <- lnt2bibtex(LNToutput, art_id = 1)
lnt2bibtex <- function(x, art_id, ...) {
Expand Down Expand Up @@ -1839,7 +1842,7 @@ check_install <- function(pkg) {
#'
#' @examples
#' # Make LNToutput object from sample
#' LNToutput <- lnt_read(lnt_sample())
#' LNToutput <- lnt_read(lnt_sample(copy = FALSE))
#'
#' # extract meta and make corrections
#' correction <- LNToutput@meta[grepl("Wikipedia", LNToutput@meta$Headline), ]
Expand Down
2 changes: 1 addition & 1 deletion man/lnt2bibtex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lnt_add.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lnt_asDate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lnt_convert.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lnt_diff.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lnt_lookup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/lnt_rename.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/lnt_similarity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 29b62e2

Please sign in to comment.