A Command for Randomly Creating Sets of Elements from a Vector
R-bloggers 2013-05-02
Summary:
# This command pairs (of arbitrary length) together a list of items randomly.# I think it is useful for simulations matching individuals together.pairup = function(x, ncol=2, unmatched.self=T) { # Calculate the length of the x vector.&n...