R %operator% 含义
2016-05-05 13:02
309 查看
%foo% is the syntax for a binary operator.
In base R:
%in%: ‘"%in%" <- function(x, table) match(x, table, nomatch = 0) > 0’
%/% and %% perform integer division and modular division respectively, and are described on the ?Arithmetic help page.
%o% gives the outer product of arrays.
%*% performs matrix multiplication.
%x% performs the Kronecker product of arrays.
In ggplot2:
%+% replaces the data frame in a ggplot.
%+replace% modifies theme elements in a ggplot.
%inside% (internal) checks for values in a range.
%||% (internal) provides a default value in case of NULL values. This function also appears internally in devtools, reshape2, roxygen2 and knitr. (In knitr it is called %n%.)
In magrittr:
%>% pipes the left-hand side into an expression on the right-hand side.
%<>% pipes the left-hand side into an expression on the right-hand side, and then assigns the result back into the left-hand side object.
%T>% pipes the left-hand side into an expression on the right-hand side, which it uses only for its side effects, returning the left-hand side.
%,% builds a functional sequence.
%$% exposes exposes columns of a data.frame or members of a list.
In data.table:
%between% checks for values in a range.
%chin% is like %in%, optimised for character vectors.
%like% checks for regular expression matches.
In Hmisc:
%nin% returns the opposite of %in%.
In devtools:
%:::% (internal) gets a variable from a namespace passed as a string.
In sp:
%over% performs a spatial join (e.g., which polygon corresponds to some points?)
In rebus:
%R% concatenates elements of a regex object.
In base R:
%in%: ‘"%in%" <- function(x, table) match(x, table, nomatch = 0) > 0’
%/% and %% perform integer division and modular division respectively, and are described on the ?Arithmetic help page.
%o% gives the outer product of arrays.
%*% performs matrix multiplication.
%x% performs the Kronecker product of arrays.
In ggplot2:
%+% replaces the data frame in a ggplot.
%+replace% modifies theme elements in a ggplot.
%inside% (internal) checks for values in a range.
%||% (internal) provides a default value in case of NULL values. This function also appears internally in devtools, reshape2, roxygen2 and knitr. (In knitr it is called %n%.)
In magrittr:
%>% pipes the left-hand side into an expression on the right-hand side.
%<>% pipes the left-hand side into an expression on the right-hand side, and then assigns the result back into the left-hand side object.
%T>% pipes the left-hand side into an expression on the right-hand side, which it uses only for its side effects, returning the left-hand side.
%,% builds a functional sequence.
%$% exposes exposes columns of a data.frame or members of a list.
In data.table:
%between% checks for values in a range.
%chin% is like %in%, optimised for character vectors.
%like% checks for regular expression matches.
In Hmisc:
%nin% returns the opposite of %in%.
In devtools:
%:::% (internal) gets a variable from a namespace passed as a string.
In sp:
%over% performs a spatial join (e.g., which polygon corresponds to some points?)
In rebus:
%R% concatenates elements of a regex object.
相关文章推荐
- Linux下日志系统详解
- linux sed命令详解
- linux: 几个常用makefile模板
- 实用网站合集(持续更新ing)
- 使用 PHP 和 Apache Solr 实现企业搜索
- 使用Xshell工具远程Linux环境部署web项目
- 莆田系医院网站提醒(Chrome 插件)
- 每天一个Linux命令(7)pwd命令
- 图解Telnet命令和命令行看邮件
- shell从入门到放弃(上)
- linux基础之bash特性
- Linux内核设计与实现 第十七章
- 《Linux内核设计与实现》第17章读书笔记
- Python MySQLdb在Linux下的快速安装
- Linux源码
- linux 一些常用的命令等
- Linux crond定时任务服务
- 强大的网站测试工具viewDNS.info记
- 【三层架构】登陆实例
- Linux使用问题杂记--解决无/var/log/messages 问题