-
Notifications
You must be signed in to change notification settings - Fork 6
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
Closes #218 modified row merge #219
Closes #218 modified row merge #219
Conversation
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.
Looking nice!! Is there anyway to get a test written for this scenario?
@evgenia-gem any chance you want to test this out from this branch - just to see if it is working for you? |
Thanks @bms63
The expected structure was not being met using aggregate() for this scenario. I completely swapped out the code so this is will always be consistent with 2 variables (library, function_name) and one row per package. Since we no longer use aggregate, my thought was the existing tests cover this. |
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.
Awesome thanks @nicholas-masel !!
@kodesiba do you have bandwidth to submit to CRAN? |
@bms63 @nicholas-masel I should be able to build and submit to CRAN. Any clue why Windows CMD check is failing? It's always something annoying with the non-linux ones |
I think it is github issue - happening in other repos im involved in |
@@ -153,7 +154,9 @@ write_masked_functions <- function(){ | |||
write_used_functions <- function(){ | |||
used_functions_list <- get_log_element("used_packages_functions") | |||
|
|||
combined <- aggregate(function_name~library, used_functions_list, paste) | |||
combined <- used_functions_list %>% | |||
group_by(library) %>% |
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.
@nicholas-masel I'm not sure what's downstream but does this dataframe need to be ungrouped for any reason down the line? Not sure if an ungroup()
is needed after the summarize()
or not
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.
@kodesiba Good comment and I checked into the documentation to be sure. Since I am using summarize()
after group()
and I only have one group, the resulting df is ungrouped as the last grouping is dropped by default.
From summarize()
:
When .groups is not specified, it is chosen based on the number of rows of the results:
If all the results have 1 row, you get "drop_last".
.groups - Grouping structure of the result.
"drop_last": dropping the last level of grouping. This was the only supported option before version 1.0.0.
Can see this has already been merged in. Do you still require testing from me? |
Thank you for your Pull Request!
We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the logrx codebase remains robust and consistent.
The spirit of logrx
While many packages to facilitate the logging of code already exist in the R ecosystem, it is hard to find a solution that works well for clinical programming applications. Many logging implementations are more implicit and rely on user input to create the log for the execution of a script. While this is useful for logging specific events of an application, in clinical programming a log has a set purpose.
logrx is built around the concept of creating a log for the execution of an R script that provides an overview of what happened as well as the environment that it happened in. We set out to create a flexible logging utility that could provide the necessary information to anyone reviewing the code execution so they can recreate the execution environment and run the code for themselves. Please make sure your Pull Request meets this spirit of logrx.
Please check off each taskbox as an acknowledgment that you completed the task. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the
dev
branch until you have checked off each task.log_remove()
.devtools::document()
so all.Rd
files in theman
folder and theNAMESPACE
file in the project root are updated appropriatelypkgdown::build_site()
and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.R CMD check
locally and address all errors and warnings -devtools::check()