How to split data into training/testing sets using sample function How to split data into training/testing sets using sample function r r