%primes% {groupdata2}R Documentation

Find remainder from 'primes' method

Description

[Stable]

When using the "primes" method, the last group might not have the size of the associated prime number if there are not enough elements left. Use %primes% to find this remainder.

Usage

size %primes% start_at

Arguments

size

Size to group (Integer)

start_at

Prime to start at (Integer)

Value

Remainder (Integer). Returns 0 if the last group has the size of the associated prime number.

Author(s)

Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk

See Also

Other staircase tools: %staircase%(), group_factor(), group()

Other remainder tools: %staircase%()

Examples

# Attach packages
library(groupdata2)

100 %primes% 2

[Package groupdata2 version 2.0.3 Index]