Skip to contents

Operators — arithmetic & strings

String arithmetic, in-place modifiers, regex assignment, and maths operators.

`%+%` `%-%` `%s*%` `%s/%`
String arithmetic operators
`%+=%` `%-=%` `%*=%` `%/=%` `%^=%` `%log=%` `%root=%`
Assignment (in-place modifier) operators
`%+-%` `%/0%`
Arithmetic convenience operators
`%regex=%`
Modify an object in place by regular expression
`%regex<-%`
Assign to a vector only where a regular expression matches
`%na<-%`
Assign a value to a vector's missing values
`%C%` `%P%`
Choose and permute operators
`%integrate%`
Inline integration operator

Operators — comparison & logic

Comparisons that handle missing values and floating point, plus logical and pattern-matching operators.

`%==%` `%===%` `%>=%` `%<=%` `%><%` `%>=<%`
Comparison operators with better missing-value handling
`%~=%` `%>~%` `%<~%`
Floating-point comparison operators
`%ni%` `%xor%` `%aon%`
Logical operators
`%rlike%` `%perl%`
SQL-style pattern-matching operators
`%~%`
Fuzzy (case- and whitespace-insensitive) string equality

Strings & interpolation

Build and format strings, including f-string interpolation.

f()
String interpolation (f-strings for R)
as.percent()
Format a proportion as a percentage string
paste_() cat0() catN() paste_series() paste_oxford()
Paste and cat helpers

Inline control flow

A fallback operator for expressions that might error.

`%else%`
Inline fallback for expressions that might error

Type conversion & checks

Shorthand conversions and a family of type/content/file predicates.

Vectors, extraction & statistics

Pull elements and words out of vectors, count uniques, build sequences, and run complete-cases summaries.

System, environment & I/O

Detect the operating system and R environment, check file types, and read delimited files.