read_file function

Method that converts a dataset into a matrix