Common R files, retrieving files and formatting dataframes