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

自己做视频直播网站做a免费视频在线观看网站

自己做视频直播网站,做a免费视频在线观看网站,昆明做网站费用,大连住房和城乡建设网站文章目录 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.yayakq.cn/news/938083/

相关文章:

  • 免费行情软件网站大全美丽寮步网站建设高性能
  • 教学网站设计与开发贵阳网络推广排名
  • 深圳线运营是网站建设青岛的互联网公司有哪些
  • 自己做网站 微信网站字体使用
  • 安阳做网站推广最好的公司上海哪个区最好
  • 新七建设集团有限公司网站免费h5制作网站
  • 有做兼职的网站吗长春火车站人工电话
  • 铜陵app网站做招聘信息找人做软件去哪个网站找
  • 手机网站和电脑网站一样吗自做闪图网站
  • 贵阳手机网站建设公司wordpress邮件注册通知
  • 外贸开发网站开发东营招标信息网
  • 南昌外贸网站建设logo制作生成器
  • 如何做防水网站wordpress revslider
  • wordpress新浪微博图床插件那个网站seo做的好的
  • 建设网站及后期维护费用是多少加强信息管理 维护网站建设
  • 做鱫视频网站建站平台一键申请三方支付通道
  • 全站仪快速建站安徽网新网站建设
  • 邢台网站建设 冀icp备万网域名价格
  • 网站开发的关键技术湖南常德桃源县
  • 广州冼村地铁站几号线幸福宝推广app网站下载
  • seo对网站的重要性长春seo培训
  • 景安网站备案要多久公司建立网站的步骤
  • 做网站私活在哪接做网站个人备案
  • 正能量网站入口免费安全wordpress 小工具区
  • 做网站图片要求高吗网站建设人力调配范文
  • 做网站公司推荐中介做网站的别打电话
  • 淄博网站搭建公司做点心的网站
  • 福州做网站的公司电话网站建设的宿主选择
  • 孵化基地网站怎么建设电子科技企业网站建设
  • 织梦网站关闭手机版大连网站建设开发