Learn R Programming

raster (version 3.6-30)

validNames: Create valid names

Description

Create a set of valid names (trimmed, no duplicates, not starting with a number).

Usage

validNames(x, prefix='layer')

Value

character

Arguments

x

character

prefix

character string used if x is empty

See Also

Examples

Run this code
validNames(c('a', 'a', '', '1', NA, 'b', 'a'))

Run the code above in your browser using DataLab