-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could dt_select support selection by column names pattern? #9
Comments
Good idea, I will definitely implement this in the next release. # dplyr
my_vars = "Se"
iris %>% select(starts_with(my_vars )) # work
# maditr
my_vars = "^Se"
iris %>% dt_select(my_vars ) # will not work |
While ^ and $ are good, but |
You can describe any name with "^" and "$", e. g. |
…pal") -> iris[,c("Sepal.Length", "Sepal.Width")]. No manual yet (issue #9)
I have tried too, but I could not support |
In
dplyr
, we haveiris %>% select(starts_with("Se"))
.In
maditr
, the analogous way isiris %>% dt_select(startsWith(colnames(.),"Se"))
.Is there some way to make it more convenient? Such as:
iris %>% dt_select("^Se")
Once receive a character, understand it as a regular expression.
The text was updated successfully, but these errors were encountered: