Hello everyone. Yesterday, in class, oru professor provided us with the following code
library(dplyr)
counties <- read.table("counties.csv" ,header = T,sep = ";")
selec6<-counties %>%
select(contains("uction"), starts_with("income"), ends_with("work"), last_col())
str(selec6)
selec7<-counties %>%
select(matches("_"))
str(selec7)
I was wondering if there is a reason to select a part of the dataframe using matches instead of constraints. Can someone please solve this question?
Best regards.