Skip to content

Commit

Permalink
Update split_var_call.R
Browse files Browse the repository at this point in the history
  • Loading branch information
madhan0923 committed Jan 31, 2024
1 parent 1261bd7 commit 0482496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/split_var_call.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ single_str_spilt <- function(result, item, sep, max_length_out) {
split_var <- function(string, max_length_out = 200L) {
# Pattern spot
pattern <- names(which.max(table(stringr::str_extract_all(string, "[:punct:]|[:blank:]")))) |>
(\(.) (ifelse(is.null(.), "", .))) ()
(\(.) (ifelse(is.null(.), "", .)))()

# Split the input string into a vector
split_vector <- unlist(stringr::str_split(string, pattern))
Expand Down

0 comments on commit 0482496

Please sign in to comment.