mkearney / textfeatures

👷‍♂️ A simple package for extracting useful features from character objects 👷‍♀️
https://textfeatures.mikewk.com
Other
166 stars 17 forks source link

fix typo in count function documentation #9

Open mkuehn10 opened 4 years ago

mkuehn10 commented 4 years ago

sorry for such a lame pull request!

EmilHvitfeldt commented 4 years ago

Hello @mkuehn10! Thanks for finding this typo and sending in a PR. Would you mind building the package documentation such that the fix will propagate to the manual pages? that would be great!

mkuehn10 commented 4 years ago

Yes I can work on that. I also noticed there was no description of n_lowersp or n_capsp in the count documentation either (or in any other documentation). I then investigated how those were created and I assume the p means percentage. I saw the code as:

o$n_capsp <- (o$n_caps + 1L) / (o$n_chars + 1L) I understand why adding 1 to the denominator would make sense, but why add 1 to the numerator here. If there were 0 capital letters then we would want this to be 0. Is this for doing some type of ratio comparison at a later time?