edit_phrase: Edit a phrase

edit_phraseR Documentation

Edit a phrase

Description

The edit_phrase is a wrapper around the R base functions sub and gsub to change the phrase in a 'musical phrase' or a 'track'

Usage

edit_phrase(obj, pattern, replacement, all = T)

Arguments

obj

Object to change. Only objects of class phrase or track are supported

pattern

Character string to be used as pattern in sub and gsub (depending on parameter all)

replacement

Character string to be used as replacement in sub and gsub (depending on parameter all)

all

Boolean indicating if all patterns found should be replaced (when TRUE) or only the first (when FALSE)

Value

an object of the same type as obj with possibly (i.e. when the pattern is found) a replaced 'phrase'

Details

See the documentation for the use of sub and gsub.

Examples

## Not run: 
#include a test function

## End(Not run)

HanOostdijk/tabraux documentation built on Nov. 17, 2022, 3:02 a.m.