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

Stratifier inside of tableone call leads to NAs, should be automatically removed #254

Closed
timtreis opened this issue Sep 10, 2021 · 2 comments · Fixed by #368
Closed

Stratifier inside of tableone call leads to NAs, should be automatically removed #254

timtreis opened this issue Sep 10, 2021 · 2 comments · Fixed by #368
Assignees
Labels
bug Something isn't working issue Used for project filtering

Comments

@timtreis
Copy link
Collaborator

Issue description

A naive 'tableone()` call leads to NAs being introduced into the rendered table.

tableone(data, strata = "Sex", 
         title = TITLE, datasource = DATASOURCE)

Screenshot_20210910_112934

Therefore the strata needs to be manually removed before rendering the table.

get_tableone(data, strata = "Sex") %>% 
  filter(variable != "Sex") %>% 
  render(title = TITLE, datasource = DATASOURCE)

This should be done automatically.

@timtreis timtreis added bug Something isn't working issue Used for project filtering labels Sep 10, 2021
@rebecca-albrecht
Copy link
Collaborator

Actually I just realized that the stratifier is not included when we set the parameter overall to F. I seems that the stratifier is only in there because of the Total column. So maybe this is even what we want?

@timtreis
Copy link
Collaborator Author

timtreis commented Dec 6, 2021

Implement na.action for removal of stratifier that leads to NAs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working issue Used for project filtering
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants