Learn R Programming

WGCNA (version 1.61)

prepComma: Prepend a comma to a non-empty string

Description

Utility function that prepends a comma before the input string if the string is non-empty.

Usage

prepComma(s)

Arguments

s

Character string.

Value

If s is non-empty, returns paste(",", s), otherwise returns s.

Examples

Run this code
# NOT RUN {
prepComma("abc");
prepComma("");
# }

Run the code above in your browser using DataLab