-
Notifications
You must be signed in to change notification settings - Fork 50
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
Direct formatted output from as_result_df
#793
Conversation
@@ -34,13 +34,13 @@ Depends: | |||
methods, | |||
R (>= 2.10) | |||
Imports: | |||
checkmate (>= 2.1.0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is time @edelarua @shajoezhu
cellvals <- as.data.frame(do.call(rbind, raw_cvals)) | ||
row.names(cellvals) <- NULL | ||
|
||
if (as_viewer || as_strings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core of changes
) | ||
|
||
# If we want to expand colnames | ||
if (expand_colnames) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
Code Coverage Summary
Diff against main
Results for commit: 9a53fd7 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Hi @Melkiades, Looks great so far! Thanks for working on this as I think it's much needed :) One thing I noticed - when there are mixed numeric types (i.e. integers & doubles) in a single column, the integers are converted to NAs. I know you can't mix types in a data frame column, so would it be possible to instead convert the integers to doubles, which I feel would be more practical? It works fine if Example: lyt <- basic_table() %>%
split_cols_by("ARM") %>%
split_rows_by("STRATA1") %>%
analyze(c("AGE", "BMRKR2"))
tbl <- build_table(lyt, ex_adsl)
as_result_df(tbl, simplify = TRUE, as_viewer = TRUE)
|
Thanks, @edelarua, for finding this problem at the source! It should be fixed now ;) |
Perfect! It's all working for me now. You may want to wait for feedback from others but if not I think it's good to go :) |
addition of
as_strings
,as_viewer
, andexpand_colnames
for what I imagine is easier QCing. @kieranjmartin fyi@mrmorgan17 try it out. Options are described in
?as_result_df
Fixes #784