How to randomly split data into three equal sizes?
问题 I have a dataset with 9558 rows from three different projects. I want to randomly split this dataset in three equal groups and assign a unique ID for each group, so that Project1_Project_2_Project3 becomes Project1 , Project2 and Project3 . I have tried many things, and googled codes from people with similar problem as I have. I have used sample_n() and sample_frac() , but unfortunately I can't solve this issue myself :/ I have made an example of my dataset looking like this: ProjectName <- c