Browse Source
Fixes #20 (and actually gets rid of purrr unlike the last commit)
0.7.0
No known key found for this signature in database
GPG Key ID: 2A514A4997464560
3 changed files with
11 additions and
9 deletions
-
DESCRIPTION
-
R/check.r
-
hrbrthemes.Rproj
|
|
@ -1,7 +1,7 @@ |
|
|
|
Package: hrbrthemes |
|
|
|
Type: Package |
|
|
|
Title: Additional Themes, Theme Components and Utilities for 'ggplot2' |
|
|
|
Version: 0.3.0 |
|
|
|
Version: 0.3.1 |
|
|
|
Date: 2017-03-01 |
|
|
|
Authors@R: c( |
|
|
|
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre")), |
|
|
|
|
|
@ -50,14 +50,15 @@ gg_check <- function(gg, dict, ignore) { |
|
|
|
|
|
|
|
tmp <- lapply(names(lbl), function(lab) { |
|
|
|
|
|
|
|
words <- stringi::stri_extract_all_words(lbl[[lab]]) |
|
|
|
words <- unlist(words) |
|
|
|
words <- purrr::discard(hunspell::hunspell(words, "text", dict = dict, ignore = ignore), |
|
|
|
~length(.)==0) |
|
|
|
|
|
|
|
if (length(words) > 0) { |
|
|
|
message(sprintf("Possible misspelled words in [%s]: (%s)", |
|
|
|
lab, paste0(words, collapse=", "))) |
|
|
|
if (length(lbl[[lab]]) > 0) { |
|
|
|
words <- stringi::stri_extract_all_words(lbl[[lab]]) |
|
|
|
words <- unlist(words) |
|
|
|
w_tmp <- hunspell::hunspell(words, "text", dict = dict, ignore = ignore) |
|
|
|
words <- w_tmp[which(sapply(w_tmp, length) > 0)] |
|
|
|
if (length(words) > 0) { |
|
|
|
message(sprintf("Possible misspelled words in [%s]: (%s)", |
|
|
|
lab, paste0(words, collapse=", "))) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
@ -3,6 +3,7 @@ Version: 1.0 |
|
|
|
RestoreWorkspace: Default |
|
|
|
SaveWorkspace: Default |
|
|
|
AlwaysSaveHistory: Default |
|
|
|
QuitChildProcessesOnExit: Default |
|
|
|
|
|
|
|
EnableCodeIndexing: Yes |
|
|
|
UseSpacesForTab: Yes |
|
|
|