Doc clarification for str_subset about dropping names. #507
Labels
bug
an unexpected problem or unintended behavior
tidy-dev-day 🤓
Tidyverse Developer Day rstd.io/tidy-dev-day
str_subset
drops names. This appears to a design choice fromstringi
(gagolews/stringi#59). Fair enough.But I got bitten by this today, as I read the documentation stating: "It's a wrapper around
x[str_detect(x, pattern)]
, and is equivalent togrep(pattern, x, value = TRUE)
." But both those alternatives do keep names, and there is no other mention of dropping attributes. I suggest to add "but without preserving attributes like names", or something similar.Consider:
The text was updated successfully, but these errors were encountered: