Revision | 56d9cf4d79e79fc308e0b6b1b983cde7e5394d4b (tree) |
---|---|
Zeit | 2022-06-30 09:54:20 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I made a function a bit more readable.
@@ -406,8 +406,13 @@ | ||
406 | 406 | remove_all_special_char <- function(df, new_pattern="" ){ |
407 | 407 | |
408 | 408 | |
409 | + ## res <- df |> | |
410 | + ## mutate(across(where(is.character), ~remove_special_char(.x, new_pattern))) | |
411 | + | |
412 | + | |
409 | 413 | res <- df |> |
410 | - mutate(across(where(is.character), ~remove_special_char(.x, new_pattern))) | |
414 | + mutate(across(where(is.character), \(x) remove_special_char(x, new_pattern))) | |
415 | + | |
411 | 416 | return(res) |
412 | 417 | |
413 | 418 |
@@ -3801,7 +3806,7 @@ | ||
3801 | 3806 | |
3802 | 3807 | my_files <- file_path |> |
3803 | 3808 | list.files() |> |
3804 | - (\(.) .[str_detect(., extension) ])() | |
3809 | + (\(x) x[str_detect(x, extension) ])() | |
3805 | 3810 | |
3806 | 3811 | if (full_path==1){ |
3807 | 3812 |