replace_module_markers: Replaces markers on a template string by other strings

View source: R/dsd.R

replace_module_markersR Documentation

Replaces markers on a template string by other strings

Description

This function can be used to replace markers in a string to other strings according to a pattern.

Usage

replace_module_markers(template_str, marker_pattern, objs)

Arguments

template_str

The template string (string with the markers).

marker_pattern

The pattern of the markers. It is a regular expression rule.

objs

A vector with the strings that will replace the markers. The replacement is made in order, that is, the first markers will be replaced by the first strings specified in this vector. This vector must have a number of strings less or equal the number of markers in the template string.

Value

The template string with the markers replaced.


DanielKneipp/DNAr documentation built on Jan. 7, 2023, 12:42 p.m.