R语言 grep()用法及代码示例 |
您所在的位置:网站首页 › r语言grepl函数 › R语言 grep()用法及代码示例 |
R 语言中的 grep() 函数用于在给定字符串的每个元素中搜索模式的匹配项。 用法: grep(pattern, x, ignore.case=TRUE/FALSE, value=TRUE/FALSE)参数: pattern: Specified pattern which is going to be matched with given elements of the string. x: Specified string vector. ignore.case: If its value is TRUE, it ignores case. value: If its value is TRUE, it return the matching elements vector, else return the indices vector.范例1: Python3 # R program to illustrate # grep function # Creating string vector x |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |