You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> stopwords <- readr::read_lines(stopword_url) %>%
+ # 空の文字列("")を削除
+ .[stringr::str_detect(., "") == TRUE]
Error in `stringr::str_detect()`:
! `pattern` can't be the empty string (`""`).
Run `rlang::last_error()` to see where the error occurred.
6.2節、p.178 の stopwords を設定するところのコードですが、stringr 1.5.0 の str_detect ではエラーが発生します。
stringr 1.5.0 で仕様が変わったようですね。
https://www.tidyverse.org/blog/2022/12/stringr-1-5-0/#empty-patterns
とりあえず、
で、回避できています。
The text was updated successfully, but these errors were encountered: