Skip to content

Commit

Permalink
Use stringr everywhere instead of stringi
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Nov 30, 2021
1 parent 1c4ede0 commit 4032abd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Expand Up @@ -98,7 +98,6 @@ Imports:
R6,
readxl,
rlang,
stringi,
stringr,
tidyr (>= 1.0.0),
tidyselect,
Expand Down
7 changes: 3 additions & 4 deletions R/Vietnam.R
Expand Up @@ -64,8 +64,7 @@ Vietnam <- R6::R6Class("Vietnam",
#' @importFrom dplyr filter select mutate rename tibble as_tibble full_join
#' @importFrom tidyr replace_na drop_na separate
#' @importFrom purrr map
#' @importFrom stringi stri_trans_general stri_trim_both stri_replace_all
#' @importFrom stringr str_to_title str_replace_all
#' @importFrom stringr str_conv str_trim str_to_title str_replace_all
#' @importFrom lubridate dmy
clean_common = function() {
# The first three elements of self$data$raw are the data
Expand Down Expand Up @@ -120,8 +119,8 @@ Vietnam <- R6::R6Class("Vietnam",
#
#tidyr::drop_na(date, region_name) %>%
mutate(
level_1_region = stri_trans_general(level_1_region, "latin-ascii"),
level_1_region = stri_trim_both(level_1_region),
level_1_region = str_conv(level_1_region, "ASCII"),
level_1_region = str_trim(level_1_region, side = "both"),
level_1_region = str_replace_all(level_1_region,
"\\(.*\\)|-| ", ""),
level_1_region = str_to_title(level_1_region),
Expand Down

0 comments on commit 4032abd

Please sign in to comment.