R/str_C.expand.grid.R

Defines functions str_C.expand.grid

Documented in str_C.expand.grid

## File Name: str_C.expand.grid.R
## File Version: 0.08

#************************************************
# combine strings using expand.grid
str_C.expand.grid <- function( xlist, indices=NULL )
{
    xeg <- expand.grid(xlist)
    if ( ! is.null(indices) ){
        xeg <- xeg[, indices ]
    }
    apply( xeg, 1, FUN=function(vv){ paste0( vv, collapse="") } )
}
#************************************************

Try the miceadds package in your browser

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

miceadds documentation built on May 29, 2024, 11:05 a.m.