Added support for R labels in CSV output. Header/footer handled by user.