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

frq fails when used for more than 1 variable and after dplyr::group_by #147

Open
iago-pssjd opened this issue Mar 23, 2021 · 0 comments
Open

Comments

@iago-pssjd
Copy link
Contributor

For example:

efc %>%
 	group_by(c172code) %>%
 	frq(is.na(nur_pst), c161sex)
New names:
* c172code -> c172code...1
* c172code -> c172code...3

carer's level of education (c172code...1) <numeric>
# total N=908  valid N=842  mean=1.97  sd=0.63

Value |                           Label |   N | Raw % | Valid % | Cum. %
------------------------------------------------------------------------
    1 |          low level of education | 180 | 19.82 |   21.38 |  21.38
    2 | intermediate level of education | 506 | 55.73 |   60.10 |  81.47
    3 |         high level of education | 156 | 17.18 |   18.53 | 100.00
 <NA> |                            <NA> |  66 |  7.27 |    <NA> |   <NA>


is.na(nur_pst) <lgl>
# total N=908  valid N=908  mean=0.46  sd=0.50

Value |   N | Raw % | Valid % | Cum. %
--------------------------------------
FALSE | 489 | 53.85 |   53.85 |  53.85
TRUE  | 419 | 46.15 |   46.15 | 100.00
<NA>  |   0 |  0.00 |    <NA> |   <NA>


carer's level of education (c172code...3) <numeric>
# total N=908  valid N=842  mean=1.97  sd=0.63

Value |                           Label |   N | Raw % | Valid % | Cum. %
------------------------------------------------------------------------
    1 |          low level of education | 180 | 19.82 |   21.38 |  21.38
    2 | intermediate level of education | 506 | 55.73 |   60.10 |  81.47
    3 |         high level of education | 156 | 17.18 |   18.53 | 100.00
 <NA> |                            <NA> |  66 |  7.27 |    <NA> |   <NA>


carer's gender (c161sex) <numeric>
# total N=908  valid N=901  mean=1.76  sd=0.43

Value |  Label |   N | Raw % | Valid % | Cum. %
-----------------------------------------------
    1 |   Male | 215 | 23.68 |   23.86 |  23.86
    2 | Female | 686 | 75.55 |   76.14 | 100.00
 <NA> |   <NA> |   7 |  0.77 |    <NA> |   <NA>
@iago-pssjd iago-pssjd changed the title frq is fails when used for more than 1 variable and after dplyr::group_by frq fails when used for more than 1 variable and after dplyr::group_by Apr 14, 2021
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