From 7d8aae10d54b16bccaeb6938ac47143ef4aa45bb Mon Sep 17 00:00:00 2001 From: Kirill Pomogajko Date: Mon, 6 May 2019 14:54:36 +0200 Subject: [PATCH] suffix_load deals with array instead of df --- R/zzz.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index 27f3459..693e340 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -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, @@ -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) -} \ No newline at end of file +}