Skip to content

Commit

Permalink
suffix_load deals with array instead of df
Browse files Browse the repository at this point in the history
  • Loading branch information
Quiri authored May 6, 2019
1 parent 4ee71be commit 7d8aae1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ suffix_load <- function(suffixes = NULL){
if(is.null(suffixes)){
suffixes <- urltools::suffix_dataset
}
cleaned_suffixes <- gsub(x = suffixes$suffixes, pattern = "*.", replacement = "", fixed = TRUE)
is_wildcard <- cleaned_suffixes[which(grepl(x = suffixes$suffixes, pattern = "*.", fixed = TRUE))]
cleaned_suffixes <- gsub(x = suffixes, pattern = "*.", replacement = "", fixed = TRUE)
is_wildcard <- cleaned_suffixes[which(grepl(x = suffixes, pattern = "*.", fixed = TRUE))]
suff_trie <- triebeard::trie(keys = reverse_strings(paste0(".", cleaned_suffixes)),
values = cleaned_suffixes)
return(list(suff_trie = suff_trie,
Expand All @@ -19,4 +19,4 @@ suffix_load <- function(suffixes = NULL){
assign("is_wildcard", holding$is_wildcard, envir = urltools_env)
assign("cleaned_suffixes", holding$cleaned_suffixes, envir = urltools_env)
assign("suff_trie", holding$suff_trie, envir = urltools_env)
}
}

0 comments on commit 7d8aae1

Please sign in to comment.