rm1stchar: Remove First Character(s)

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rm1stchar.R

Description

Deletes the first n character(s) of a character object.

Usage

1
rm1stchar(x, n = 1)

Arguments

x

Character, e.g, each element may represent the name of a single gauging station.

n

numeric, indicating the number of characters that have to be removed from the beginning of x

Value

character object of the same length as x.

Author(s)

Mauricio Zambrano-Bigiarini, mzb.devel@gmail

See Also

substr

Examples

1
2
3
4
5
6
7
8
## Loading the monthly time series of precipitation within the Ebro River basin.
data(EbroPPtsMonthly)

# Getting the name of each gauging station.
names <- colnames(EbroPPtsMonthly)

# Removing the initial letter 'P' of the name of each gauging station.
rm1stchar(names)

hydroTSM documentation built on March 13, 2020, 2:23 a.m.