read_data function

reads data from files into an R data frame.