Added option to upload datasets from user. Also uses sample R algorithm.