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

table_export column appearing in place of grouping variable column when unit_markup is used #9

Open
timothytsai opened this issue Mar 2, 2018 · 0 comments

Comments

@timothytsai
Copy link

I observed some unusual behavior when using a grouping variable and unit_markup:

tframe <- data.frame(
group = factor(sample(1:2, 100, replace = T)),
var1 = sample(1:2, 100, replace = T),
var2 = sample(1:6, 100, replace = T), 
var3 = sample(seq(0, 100, 10), 100, replace = T)
)

# produces a table_export column with factor levels as a vector in each row
tframe %>%
 group_by(group) %>%
select(group, var1, var2) %>% 
 ezsummary(p_type = "percent", digits = 0, unit_markup = "[. (.)]")

# works normally
tframe %>%
 group_by(group) %>%
select(group, var1, var2) %>% 
 ezsummary(p_type = "percent", digits = 0)

Thanks.

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