I have a vector of 300 numbers (from 1 to 300). I want to create two subsets, i.e., model/training (200 numbers) and testing set (100 numbers) with replacement. I tried to use sample and subset but didn't got the results I want.
MWE:x=(1,2,3,.......300)x1 = (1,1,2,3,5,5,...........,300) (Consider it training set of 200 samples)x2 = (1,3,9,101,130,130,..........299)Any suggestion please !!!!!