aliases: Python-inspired aliases for R functions

Description Usage Format Examples

Description

These are some aliases for R function which are more in line with Python equivalents.

Usage

1
2
3
4
5
6
7
8
9
len()

reversed(x)

sorted(x, decreasing = FALSE, ...)

True

False

Format

An object of class logical of length 1.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# python abbreviates to len, R is lengthier
base::length(1:5)
len(1:5)

# for rev the trend is reversed
base::rev(5:1)
reversed(5:1)

# returns a sorted copy
base::sort(sample(1:5))
sorted(sample(1:5))

# don't really use these...
identical(False, FALSE)
isTRUE(True)

blmoore/pythonistr documentation built on May 20, 2019, 3:34 p.m.