zoukankan      html  css  js  c++  java
  • R %operator% 含义

    %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.

  • 相关阅读:
    库函数文件操作
    系统文件操作函数
    time函数
    字符(串)输入输出函数
    select&epoll
    epoll
    select
    Apache 配置虚拟主机三种方式
    Apache VirtualHost配置
    Scrapy中用xpath/css爬取豆瓣电影Top250:解决403HTTP status code is not handled or not allowed
  • 原文地址:https://www.cnblogs.com/arkenstone/p/5461452.html
Copyright © 2011-2022 走看看