当前位置: 首页 > news >正文

黄页网品种大全2021上海网站搜索排名优化哪家好

黄页网品种大全2021,上海网站搜索排名优化哪家好,如何测试网站速度,安全的网站建设服务文章目录 matchpmatchcharmatch match ?matchDescription match returns a vector of the positions of (first) matches of its first argument in its second. 第一个向量中的元素在第二个向量中的位置,如果第二个向量中有多个仅返回第一个match 元素的位置&…

文章目录

  • match
  • pmatch
  • charmatch

match

?match
Description
match returns a vector of the positions of (first) matches of its first argument in its second.
第一个向量中的元素在第二个向量中的位置,如果第二个向量中有多个仅返回第一个match 元素的位置,第二个向量中不存在则返回NULL%in% is a more intuitive interface as a binary operator, which returns a logical vector indicating if there is a match or not for its left operand.操作符 %in% 是match的简易变形版本,返回结果为TRUE,FALSEUsage
match(x, table, nomatch = NA_integer_, incomparables = NULL)x %in% tableArguments
x	 vector or NULL: the values to be matched. Long vectors are supported.table	vector or NULL: the values to be matched against. Long vectors are not supported.nomatch	 the value to be returned in the case when no match is found. Note that it is coerced to integer.
如果没有match,应该返回什么值,默认是NULLincomparables	 a vector of values that cannot be matched. Any value in x matching a value in this vector is assigned the nomatch value. For historical reasons, FALSE is equivalent to NULL.
类似于排除第一个向量中的某些元素,当第一个向量中的某些元素match 该参数指定的向量时,则返回NULL。
Examples
# 取两个向量的交集
intersect <- function(x, y) y[match(x, y, nomatch = 0)]
intersect(1:10, 7:20)1:10 %in% c(1,3,5,9)
sstr <- c("c","ab","B","bba","c",NA,"@","bla","a","Ba","%")
sstr[sstr %in% c(letters, LETTERS)]

pmatch

?pmatch
Description
pmatch seeks matches for the elements of its first argument among those of its second.Usage
pmatch(x, table, nomatch = NA_integer_, duplicates.ok = FALSE)Arguments
x	the values to be matched: converted to a character vector by as.character. Long vectors are supported.table	the values to be matched against: converted to a character vector. Long vectors are not supported.nomatch	the value to be returned at non-matching or multiply partially matching positions. Note that it is coerced to integer.duplicates.ok	should elements be in table be used more than once?
这个参数控制该函数的行为,决定第二个向量中可以match几次,是遇到第一个match的就终止match还是寻找所有可以match的
Examples
pmatch("", "")                             # returns NA
pmatch("m",   c("mean", "median", "mode")) # returns NA    <--- 更具这一个示例,我觉得还是不要考虑使用这个函数了,通常我们会认为应该返回一个位置的,但返回了NA,容易给人造成误导。
pmatch("me",c("mean", "median", "mode"),duplicates.ok = TRUE) # returns NA
pmatch("med", c("mean", "median", "mode")) # returns 2pmatch(c("", "ab", "ab"), c("abc", "ab"), dup = FALSE)
pmatch(c("", "ab", "ab"), c("abc", "ab"), dup = TRUE)
## compare
charmatch(c("", "ab", "ab"), c("abc", "ab"))

charmatch

?charmatch
Description
charmatch seeks matches for the elements of its first argument among those of its second.Usage
charmatch(x, table, nomatch = NA_integer_)Arguments
x	the values to be matched: converted to a character vector by as.character. Long vectors are supported.table	the values to be matched against: converted to a character vector. Long vectors are not supported.nomatch		the (integer) value to be returned at non-matching positions.

if multiple exact or multiple partial matches are found then 0 is returned and if no match is found then nomatch is returned.

Examples
charmatch("", "")                             # returns 1
charmatch("m",   c("mean", "median", "mode")) # returns 0
charmatch("med", c("mean", "median", "mode")) # returns 2
http://www.ritt.cn/news/23932.html

相关文章:

  • 广东营销型网站建设多少钱广告联盟点击赚钱平台
  • 网站开发公司如何拓展业务实时热榜
  • 中小企业网站建设客户需求调查问卷seo zac
  • 网站建设如何选择软文案例200字
  • 网站建设自优化推广网站怎么做
  • 在建工程查询网站能打开任何网站浏览器
  • 做360手机网站优化排乐陵seo优化
  • 网站的需求分析都有哪些内容产品网络推广的方法有哪些
  • 网站js跳转aso应用优化
  • 建设门户网站都需要什么意思国外免费网站域名服务器查询
  • 体育网站建设视频室内设计培训
  • 电商网站建设在哪里找设计师jsurl中文转码
  • 安全的合肥网站建设老域名
  • 网站建设费如何做账百度收录提交入口
  • 西安手机网站建设动力无限免费网站收录入口
  • 商业网站的建设与维护短视频平台推广
  • 做网站网站关键词是什么什么是sem
  • 徐州城乡建设招投标网站公司网页制作教程
  • 网站开发的系统设计怎么写网站排名优化专业定制
  • 自己做网站 微信百度关键词排名推广话术
  • iis搭建网站时 属于默认文档的是关键词的选取原则有
  • 如何搭建购物平台长沙seo优化排名
  • 怎样做已有网站的编辑维护湖南seo快速排名
  • 专门做家纺的网站专业seo推广
  • 东易日盛装饰公司上市了吗郑州seo外包公司哪家好
  • 淄博网站推广搜索词分析工具
  • 如何自己做web网站网络营销服务企业
  • 网站建设什么好杭州百度竞价推广公司
  • ecs怎么做多个网站网站建设公司哪个好呀
  • 视频网站如何优化网址收录入口