Learn R Programming

eatTools (version 0.7.8)

removePattern: Removes a specified pattern from a string.

Description

Function remove a specified string from a character vector.

Usage

removePattern ( string, pattern)

Value

a character string

Arguments

string

a character vector

pattern

a character pattern of length 1

Examples

Run this code
str <- c(".d1.nh.120", "empty", "110", ".nh.dgd", "only.nh")
removePattern(str, ".nh.")

Run the code above in your browser using DataLab