nth_element: Function to return every nth element of a vector

View source: R/nth_element.R

nth_elementR Documentation

Function to return every nth element of a vector

Description

Useful fo reducing entry overload for discrete axis on a plot. Helper function.

Usage

nth_element(x, n = 2)

Arguments

v

A character vector.

Author(s)

Andreas Scharmueller, andschar@proton.me

Examples

x = row.names(mtcars)
nth_element(x, 3)


andschar/andmisc documentation built on Jan. 19, 2025, 10:46 a.m.