Learn R Programming

pergola (version 1.0)

makealtord: Creates vectors with highly distant neighbors

Description

Creates a vector of numbers 1 to n, where the neighbors are as distant as possible. For the grey scale plot, that guarantees, that the shades of grey are easy to distinguish. For instance, 1, 4, 2, 5, 3; all numbers have a distance of at least 2 and where possible 3.

Usage

makealtord(n = 3)

Arguments

n
Length of vector.

Value

Vector of length n.