How to randomly split the data set into multiple different sets:(training 70%:validation 10%(optional):testing 20%) in R?
Usually you choose the ratio between training and test data by how many samples you have, for example if you do not have that many you would go to something like 90:10, but with a larger one you can even co sider something like 75:25, although, 80:20 sounds good for your case.

For the random splitting that you are talking about, you should search and learn a lit k-fold cross-validation. It's a method with which you split your data in training and test sets k times in order to validate your model on different training and test sets each time.

About the R implementation i cannot really help you, but im pretty sure it should be quite easy to find a guide on how to do that.

Good luck.