rotations_to_cycle-helpers: 'rotations_to_cycle' Helpers

rotations_to_cycle-helpersR Documentation

rotations_to_cycle Helpers

Description

These functions assist 'rotations_to_cycle()':

  • 'std_rotations()' standardizes the 'rotations' string

  • 'split_rotations()' splits the string into a vector of numbers

  • 'validate_rotations()' validates expectations for 'rotations'

  • 'expand_rotations()' expands the numeric vector to a logical one

'std_rotations()' has helper functions of its own:

  • 'remove_whitespace()' removes all whitespace from a string

  • 'dash_to_space()' converts all dashes to spaces

  • 'keep_numeric_space()' removes all non-numeric/space characters

  • 'space_to_dash()' converts all spaces back to dashes

Usage

expand_rotations(rtns)

validate_rotations(rtns)

split_rotations(rtns)

std_rotations(rtns)

remove_whitespace(string)

dash_to_space(string)

keep_numeric_space(string)

space_to_dash(string)

Arguments

rtns

The 'rotations' vector in various formats

string

A character string


jesse-smith/schedules documentation built on July 21, 2022, 9:40 a.m.