@@ -142,6 +142,7 @@ write_masked_functions <- function(){
142
142
# ' @return Formatted vector of used package functions
143
143
# ' @export
144
144
# '
145
+ # ' @importFrom dplyr summarize
145
146
# ' @importFrom purrr map2
146
147
# ' @importFrom stats aggregate
147
148
# '
@@ -153,7 +154,9 @@ write_masked_functions <- function(){
153
154
write_used_functions <- function (){
154
155
used_functions_list <- get_log_element(" used_packages_functions" )
155
156
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 = " , " ))
157
160
158
161
map2(combined $ library , combined $ function_name , ~ paste(paste0(" {" , .x , " }" ), paste0(.y , collapse = " , " ))) %> %
159
162
unname() %> %
@@ -183,7 +186,9 @@ write_unapproved_functions <- function(){
183
186
return (" No unapproved packages or functions used" )
184
187
}
185
188
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 = " , " ))
187
192
188
193
map2(combined $ library , combined $ function_name , ~ paste(paste0(" {" , .x , " }" ), paste0(.y , collapse = " , " ))) %> %
189
194
unname() %> %
0 commit comments