metdat {MOSS}R Documentation

Extracts (and merges) chunks of characters.

Description

Extracts (and merges) chunks of characters.

Usage

metdat(x, i, sep = "-", collapse = sep)

Arguments

x

A character vector.

i

Index specifying which chunks of characters will be extracted (and merged).

sep

Chunks separator character. Defaults to "-".

collapse

New chunks separator character. Default to 'sep'.

Value

A character vector with the extracted (and merged) chunks of characters.

Examples

x <- "this is one chunk of characters & this is another one"
metdat(x, 1, " & ")
metdat(x, 2, " & ")
metdat(x, c(1, 2), " & ")
metdat(x, c(1, 2), " & ", " and ")

[Package MOSS version 0.2.2 Index]