def results_summary(ronas, use_weights):
    """
    This function outputs a summary of the RONAS for each population and
    covariate.
    """
    pop_names = ronas[0].pop_names
    for i, j in enumerate(pop_names):
        if i == 0:
            print("Covar\t%s" % "\t".join([x.name for x in ronas]))
            print("#SNPs\t%s" % "\t".join([str(x.count_markers()) for x in
                                           ronas]))
        print("%s\t%s" % (j, "\t".join([str(x.avg_ronas[i]) for x in ronas])))

    print("Min R^2\t%s" %
          "\t".join([str(np.nanmin(list(x.corr_coef.values()))) for x in
                     ronas]))

    print("Max R^2\t%s" %
          "\t".join([str(np.nanmax(list(x.corr_coef.values()))) for x in
                     ronas]))

    # if use_weights is True:
    #     means = [str(np.average(list(x.corr_coef.values()),
    #                             weights=list(x.corr_coef.values()))) for x in
    #              ronas]
    # else:
    means = [str(np.nanmean(list(x.corr_coef.values()))) for x in ronas]
    print("Average R^2\t%s" % "\t".join(means))