Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
fix #146 chunks stuff pulled out completely
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jan 19, 2019
1 parent 93b870a commit 601b73a
Show file tree
Hide file tree
Showing 21 changed files with 348 additions and 1,055 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description: Provides a single interface to many sources of full text
included for searching for articles, downloading full or partial
text, downloading supplementary materials, converting to various
data formats.
Version: 1.1.0.9235
Version: 1.1.3.9311
License: MIT + file LICENSE
Authors@R: c(
person("Scott", "Chamberlain",
Expand Down Expand Up @@ -45,7 +45,8 @@ Imports:
Suggests:
roxygen2 (>= 6.1.1),
testthat,
knitr
knitr,
pubchunks
RoxygenNote: 6.1.1
X-schema.org-applicationCategory: Literature
X-schema.org-keywords: text-mining, literature, pdf, xml, publications, citations, full-text, TDM
Expand Down
7 changes: 6 additions & 1 deletion R/as.ft_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@
#'
#' # call as.ft_data
#' x <- as.ft_data(path = dir)
#' x <- as.ft_data()
#'
#' # output lives underneath a special list index "cached"
#' # representing already present files
#' x$cached
#'
#' # collect chunks
#' # x %>% ft_collect %>% ft_chunks(c("doi", "title"))
#' if (requireNamespace("pubchunks")) {
#' library(pubchunks)
#' res <- ft_collect(x)
#' pub_chunks(res, c("doi", "title")) %>% pub_tabularize()
#' }
as.ft_data <- function(path = NULL) {
if (is.null(path)) path <- ftxt_cache$cache_path_get()
if (!dir.exists(path)) stop("path does not exist")
Expand Down
Loading

0 comments on commit 601b73a

Please sign in to comment.