R/swp.R

Defines functions swp

Documented in swp

swp <-
function (y, sep) 
{
    ifelse(missing(sep) == TRUE, sep <- ", ", NA)
    sy <- vector()
    length(sy) <- length(y)
    for (i in 1:length(y)) sy[i] <- paste(strsplit(y[i], sep)[[1]][2], 
        strsplit(y[i], sep)[[1]][1], sep = sep)
    rm(i)
    return(sy)
}

Try the multiplex package in your browser

Any scripts or data that you put into this service are public.

multiplex documentation built on Dec. 17, 2017, 9:04 a.m.