grepl 與 grep
本練習屬於課程
R 中級
練習說明
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# The emails vector has already been defined for you
emails <- c("[email protected]", "[email protected]", "[email protected]",
"invalid.edu", "[email protected]", "[email protected]")
# Use grepl() to match for "edu"
# Use grep() to match for "edu", save result to hits
# Subset emails using hits