char_location: char_location() gets the location of a character within a...

View source: R/char_location.R

char_locationR Documentation

char_location() gets the location of a character within a string

Description

char_location() gets the location of a character within a string

Usage

char_location(string, char)

Arguments

string

is a string or text line

char

is character we want to locate

Details

is a simple wrapper of the function 'stringr::str_locate'. Is used to generate codebook.

Value

returns a number, which is the location before the character is found within a string

Examples

char_location('this is text', 'x')

dacarras/r4sda documentation built on Nov. 9, 2023, 10:17 a.m.