I am trying to break my habit of `for` loops by using `apply` but I've gotten stumped on this one. I have a for loop that collapses every two rows into one row for an object, `obj.tmp`(366 by 34343), but it is slow.

Here's a much shortened example:

```
df <- data.frame(X1 = letters[1:10], X2 = letters[11:20], stringsAsFactors = FALSE)  

```

Thus:

```
> df
X1 X2
a  k
b  l
c  m
d  n
e  o
f  p
g  q
h  r
i  s
j  t

for(i in 1:(nrow(df)/2)){
  df2[i,] <- apply( df[(i*2-1):(i*2),], 2, paste, collapse = "")
}

```

Output:

```
> df2 
X1  X2
ab  kl
cd  mn
ef  op
gh  qr
ij  st

```

Suggestions on a better method?