str_keep: Keep only a type of characters in a string

View source: R/str_keep.r

str_keepR Documentation

Keep only a type of characters in a string

Description

Keep only a type of characters in a string.

Usage

str_keep(string, keep = c("text", "numbers", "special"))

Arguments

string

A character vector

keep

A character single value (default = 'text'), that will be the type of character to keep

Details

The argument 'keep' can be one of: 'text', 'number', 'special'.

Value

A character vector.

Examples


string <- "1ABCF45Z89$$%#"

str_keep(string,keep = "text")

str_keep(string,keep = "numbers")

str_keep(string,keep = "special")

vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.