R/combpaste.R

Defines functions combpaste

Documented in combpaste

combpaste <-
function(x,y)
# combpaste()  -  paste elements of x anyd y together in all combinations
{
  n <- 0
  combxy <- rep(0,length(x) * length(y))
  for(i in 1:length(x)){
    for(j in 1:length(y)){
      n <- n+1
      combxy[n] <- paste(x[i],":",y[j],sep="",collapse=NULL)
    }
  }
  return(combxy)
}

Try the dmm package in your browser

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

dmm documentation built on June 22, 2024, 10:38 a.m.