Skip to content

default argument differs for readability and lexdiv #1715

Description

@kbenoit

When nothing is passed to measure in lexical diversity, TTR is passed as default and an object is created. However, when no arguments are passed to readability, it throws an error - this should behave similarly to lexdiv (ARI should be assigned when empty).

> textstat_lexdiv(dfm(data_char_ukimmig2010))
      document       TTR
1          BNP 0.3549083
2    Coalition 0.5757576
3 Conservative 0.5176991
4       Greens 0.4950658
5       Labour 0.4474960
6       LibDem 0.5506912
7           PC 0.7128713
8          SNP 0.6532258
9         UKIP 0.4872611
> textstat_readability((data_char_ukimmig2010))
 Error in textstat_readability(corpus(x), measure, remove_hyphens, min_sentence_length,  : 
  argument "measure" is missing, with no default 

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions