Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequency of characters coercible as numerics #140

Open
iago-pssjd opened this issue Sep 25, 2020 · 0 comments
Open

Frequency of characters coercible as numerics #140

iago-pssjd opened this issue Sep 25, 2020 · 0 comments

Comments

@iago-pssjd
Copy link
Contributor

iago-pssjd commented Sep 25, 2020

If we have a character vector which can be coerced to numeric, it is done by frq (lines 485, 512-513, 545-546 of frq.r). Then we get

> frq(c("00","00","01","11"))

x <character>
# total N=4  valid N=4  mean=3.00  sd=5.35

Value | N | Raw % | Valid % | Cum. %
------------------------------------
    0 | 2 |    50 |      50 |     50
    1 | 1 |    25 |      25 |     75
   11 | 1 |    25 |      25 |    100
 <NA> | 0 |     0 |    <NA> |   <NA>

But one may be interested in get 00 01 11 in the column Value. It would be interesting to have an option to allow not coercing the source value.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant