Skip to content

head.dfm() prints dfm if ncol < 20 #684

Description

@kbenoit
tmp <- dfm(data_corpus_irishbudget2010)

head(tmp)
# Document-feature matrix of: 14 documents, 5,058 features (80.9% sparse).
# (showing first 6 documents and first 6 features)
# features
# docs                               when  i presented the supplementary budget
# 2010_BUDGET_01_Brian_Lenihan_FF     5 73         1 539             7     25
# 2010_BUDGET_02_Richard_Bruton_FG    2  6         0 305             0     27
# 2010_BUDGET_03_Joan_Burton_LAB     11 40         0 428             0     39
# 2010_BUDGET_04_Arthur_Morgan_SF    21 26         0 501             1     33
# 2010_BUDGET_05_Brian_Cowen_FF       4 17         0 394             0     21
# 2010_BUDGET_06_Enda_Kenny_FG       12 25         1 304             1     24

head(tmp[, 1:10])
# Document-feature matrix of: 14 documents, 10 features (18.6% sparse).
# 14 x 10 sparse Matrix of class "dfmSparse"
# features
# docs                                    when  i presented the supplementary budget  to this house last
# 2010_BUDGET_01_Brian_Lenihan_FF          5 73         1 539             7     25 310   99    10    6
# 2010_BUDGET_02_Richard_Bruton_FG         2  6         0 305             0     27 172   55     0    5
# 2010_BUDGET_03_Joan_Burton_LAB          11 40         0 428             0     39 157   53     6    4
# 2010_BUDGET_04_Arthur_Morgan_SF         21 26         0 501             1     33 204   85     5    4
# 2010_BUDGET_05_Brian_Cowen_FF            4 17         0 394             0     21 210   43     4    6
# 2010_BUDGET_06_Enda_Kenny_FG            12 25         1 304             1     24 119   47     0    4
# 2010_BUDGET_07_Kieran_ODonnell_FG        5 11         0 193             0     21  68   11     3    2
# 2010_BUDGET_08_Eamon_Gilmore_LAB         6 10         0 270             0     28  98   38     3    3
# 2010_BUDGET_09_Michael_Higgins_LAB       3  7         0  78             0      1  31    6     2    0
# 2010_BUDGET_10_Ruairi_Quinn_LAB          5 19         0  80             0      1  47   15    12    1
# 2010_BUDGET_11_John_Gormley_Green        0  9         0  64             0     10  26   15     1    1
# 2010_BUDGET_12_Eamon_Ryan_Green          6 17         0  83             0      9  57   15     0    1
# 2010_BUDGET_13_Ciaran_Cuffe_Green        3  7         0  77             0      7  31   23     1    1
# 2010_BUDGET_14_Caoimhghin_OCaolain_SF    7  5         1 284             1     28 109   54     2    9
# (showing first 6 documents and first 6 features)
# features
# docs                               when  i presented the supplementary budget
# 2010_BUDGET_01_Brian_Lenihan_FF     5 73         1 539             7     25
# 2010_BUDGET_02_Richard_Bruton_FG    2  6         0 305             0     27
# 2010_BUDGET_03_Joan_Burton_LAB     11 40         0 428             0     39
# 2010_BUDGET_04_Arthur_Morgan_SF    21 26         0 501             1     33
# 2010_BUDGET_05_Brian_Cowen_FF       4 17         0 394             0     21
# 2010_BUDGET_06_Enda_Kenny_FG       12 25         1 304             1     24

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions