getNextName: Find a Deconflicted Variable Name

View source: R/base.R

getNextNameR Documentation

Find a Deconflicted Variable Name

Description

This is used to name the first temperature found as 'temperature', the second as 'temperature2', etc.

Usage

getNextName(name, existingNames)

Arguments

name

character value indicating the variable name.

existingNames

vector of character values of existing variable names.

Value

[getNextName] returns a deconflicted version of 'name'.

Author(s)

Dan Kelley

Examples

library(oceglider)
e <- NULL
e <- c(e, getNextName("S", e))
e <- c(e, getNextName("T", e))
e <- c(e, getNextName("S", e))
e <- c(e, getNextName("T", e))
e <- c(e, getNextName("p", e))
print(e)


dankelley/oceanglider documentation built on June 8, 2025, 4:20 a.m.