quanteda / readtext

an R package for reading text files
https://readtext.quanteda.io
120 stars 28 forks source link

need a print method for readtext objects #87

Closed kbenoit closed 7 years ago

kbenoit commented 7 years ago

to avoid tying up the console and seeing the annoying beachball spin!!

kbenoit commented 7 years ago

Added in v0.31 (8ef5ca6): now uses a "tibble" print method with a truncated text field.

readtext(paste0(system.file("extdata/", package = "readtext"), "txt/UDHR/"),
         docvarsfrom = "filenames", 
         docvarnames = c("document", "language"))
## readtext object consisting of 13 documents and 2 docvars.
## # data.frame [13 × 4]
##              doc_id                      text document language
## *             <chr>                     <chr>    <chr>    <chr>
## 1  UDHR_chinese.txt "世界人权宣言\n联合国"...     UDHR  chinese
## 2    UDHR_czech.txt           "VŠEOBECNÁ "...     UDHR    czech
## 3   UDHR_danish.txt           "Den 10. de"...     UDHR   danish
## 4  UDHR_english.txt           "Universal "...     UDHR  english
## 5   UDHR_french.txt           "Déclaratio"...     UDHR   french
## 6 UDHR_georgian.txt           "FLFVBFYBC "...     UDHR georgian
## # ... with 7 more rows