dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data
522 stars 78 forks source link

Suggestion: mention it when an integer is a sequence #44

Closed paulfeitsma closed 5 years ago

paulfeitsma commented 6 years ago

When in the data frame summary an integer column contains for example 110 distinct values (0 < 43 < 109) it is useful to note that it is the sequence 0:109.

dcomtois commented 6 years ago

Not sure where that info would fit in... And with the graph, this aspect is made apparent (although not perfectly).

paulfeitsma commented 6 years ago

In the example below (PersonID variable) we could change "1000 distinct values" into "1000 distinct values (sequence 1:1000)". For integer sequences this would be the case when max(var) - min(var) + 1 = number of distinct values. I would suggest to only implement this enhancement for integer sequences.

df_summary_example_salaries

dcomtois commented 5 years ago

I've added the "(Integer sequence)" note feature. Thanks for that good idea!