R/quanteda-documentation.R
, R/corpus-methods-base.R
, R/dfm-print.R
, and 3 more
print-quanteda.Rd
Print method for quanteda objects. In each max_n*
option, 0 shows none, and
-1 shows all.
# S3 method for corpus print( x, max_ndoc = quanteda_options("print_corpus_max_ndoc"), max_nchar = quanteda_options("print_corpus_max_nchar"), show_summary = quanteda_options("print_corpus_summary"), ... ) # S4 method for dfm print( x, max_ndoc = quanteda_options("print_dfm_max_ndoc"), max_nfeat = quanteda_options("print_dfm_max_nfeat"), show_summary = quanteda_options("print_dfm_summary"), ... ) # S4 method for dfm show(object) # S4 method for dictionary2 print( x, max_nkey = quanteda_options("print_dictionary_max_nkey"), max_nval = quanteda_options("print_dictionary_max_nval"), show_summary = quanteda_options("print_dictionary_summary"), ... ) # S4 method for dictionary2 show(object) # S4 method for fcm print( x, max_nfeat = quanteda_options("print_dfm_max_nfeat"), show_summary = TRUE, ... ) # S4 method for fcm show(object) # S3 method for tokens print( x, max_ndoc = quanteda_options("print_tokens_max_ndoc"), max_ntoken = quanteda_options("print_tokens_max_ntoken"), show_summary = quanteda_options("print_tokens_summary"), ... )
x, object | the object to be printed |
---|---|
max_ndoc | max number of documents to print; default is from the
|
max_nchar | max number of tokens to print; default is from the
|
show_summary | print a brief summary indicating the number of documents and other characteristics of the object, such as docvars or sparsity. |
... | not used |
max_nfeat | max number of features to print; default is from the
|
max_nkey | max number of keys to print; default is from the
|
max_nval | max number of values to print; default is from the
|
max_ntoken | max number of tokens to print; default is from the
|
#> Corpus consisting of 9 documents. #> BNP : #> "IMMIGRATION: AN UNPARALLELED CRISIS WHIC..." #> #> Coalition : #> "IMMIGRATION. The Government believes th..." #> #> Conservative : #> "Attract the brightest and best to our co..." #> #> [ reached max_ndoc ... 6 more documents ]#> Tokens consisting of 9 documents. #> BNP : #> [1] "IMMIGRATION" ":" "AN" "UNPARALLELED" "CRISIS" #> [6] "WHICH" #> [ ... and 3,274 more ] #> #> Coalition : #> [1] "IMMIGRATION" "." "The" "Government" "believes" #> [6] "that" #> [ ... and 254 more ] #> #> Conservative : #> [1] "Attract" "the" "brightest" "and" "best" "to" #> [ ... and 493 more ] #> #> [ reached max_ndoc ... 6 more documents ]#> Document-feature matrix of: 9 documents, 1,660 features (81.8% sparse). #> features #> docs immigration : an unparalleled crisis which only the bnp can #> BNP 21 12 15 1 2 9 4 191 13 1 #> Coalition 6 0 1 0 0 0 0 13 0 0 #> Conservative 3 2 2 0 0 0 1 21 0 2 #> [ reached max_ndoc ... 6 more documents, reached max_nfeat ... 1,650 more features ]