Skip to content

Commit f618f59

Browse files
Closes #218 modified row merge (#219)
* modified row merge
1 parent 700fe00 commit f618f59

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: logrx
22
Title: A Logging Utility Focus on Clinical Trial Programming Workflows
3-
Version: 0.3.0
3+
Version: 0.3.1
44
Authors@R:
55
c(
66
person(given = "Nathan",

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ importFrom(dplyr,group_by)
1818
importFrom(dplyr,mutate)
1919
importFrom(dplyr,rename_with)
2020
importFrom(dplyr,select)
21+
importFrom(dplyr,summarize)
2122
importFrom(dplyr,ungroup)
2223
importFrom(magrittr,"%>%")
2324
importFrom(miniUI,gadgetTitleBar)

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
# logrx 0.3.1
3+
4+
- Hotfix to update used and unapproved packages and functions writing (#218)
5+
26
# logrx 0.3.0
37

48
- Moved website theme to bootstrap 5, enabled search (#179)

R/writer.R

+7-2
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ write_masked_functions <- function(){
142142
#' @return Formatted vector of used package functions
143143
#' @export
144144
#'
145+
#' @importFrom dplyr summarize
145146
#' @importFrom purrr map2
146147
#' @importFrom stats aggregate
147148
#'
@@ -153,7 +154,9 @@ write_masked_functions <- function(){
153154
write_used_functions <- function(){
154155
used_functions_list <- get_log_element("used_packages_functions")
155156

156-
combined <- aggregate(function_name~library, used_functions_list, paste)
157+
combined <- used_functions_list %>%
158+
group_by(library) %>%
159+
summarize(function_name = paste0(.data[["function_name"]], collapse = ", "))
157160

158161
map2(combined$library, combined$function_name, ~paste(paste0("{", .x, "}"), paste0(.y, collapse = ", "))) %>%
159162
unname() %>%
@@ -183,7 +186,9 @@ write_unapproved_functions <- function(){
183186
return("No unapproved packages or functions used")
184187
}
185188

186-
combined <- aggregate(function_name~library, unapproved_functions_list, paste)
189+
combined <- unapproved_functions_list %>%
190+
group_by(library) %>%
191+
summarize(function_name = paste0(.data[["function_name"]], collapse = ", "))
187192

188193
map2(combined$library, combined$function_name, ~paste(paste0("{", .x, "}"), paste0(.y, collapse = ", "))) %>%
189194
unname() %>%

0 commit comments

Comments
 (0)