print out files for R with quantile as a factor