How to randomly select certain percentage of rows and create new columns in r : I have a species column containing 100 species names. I have to distribute the species into four columns randomly such that each column will take a specific percentage of species. lets say the first column takes 20%, the second 30%, the third 40% and the last 10%. The four columns will be four different environments ie. Restricted, Tidal flat, beach, estuary. Hence the column intake will be predefined but the selection will be random.