R/substitute.in.clist.R

substitute.in.clist <-
function (clist, find.string, replace.string, sep = ",") 
{
    Vec <- ClistToVec(clist, sep = sep)
    matches <- Vec == find.string
    if (any(matches)) {
        Vec[matches] <- replace.string
        return(paste(Vec, collapse = sep))
    }
    else return(clist)
}
Auburngrads/SMRD documentation built on Sept. 14, 2020, 2:21 a.m.