Skip to content

Instantly share code, notes, and snippets.

View muye0928's full-sized avatar
🎯
Focusing

Iris muye0928

🎯
Focusing
View GitHub Profile
@briandk
briandk / pasteUsingSepAndCollapseInR.R
Created November 27, 2014 07:11
Understanding `sep` and `collapse` in R using `paste()
# The difference between the `sep` and `collapse` arguments
# in paste can be thought of like this:
#
# paste can accept multiple *vectors* as input, and will
# concatenate the ith entries of each vector pairwise
# (or tuplewise), if it can.
#
# When you pass paste multiple vectors, sep defines what
# separates the entries in those tuple-wise concatenations.
#