KentonWhite / ProjectTemplate

A template utility for R projects that provides a skeletal project.
http://projecttemplate.net
GNU General Public License v3.0
623 stars 159 forks source link

Change reader signature #261

Closed Hugovdberg closed 6 years ago

Hugovdberg commented 6 years ago

Major change of the interface, this is a pull request against the release-1.0.0 branch so we can clean up the current 0.8.2 release and finalise it into the 0.8.3 release. This feature needs some thorough testing and should not be released in 0.8.3 in my opinion.

Types of change

Pull request checklist


Proposed changes

KentonWhite commented 6 years ago

@Hugovdberg Is this ready for review or still working on it?

Hugovdberg commented 6 years ago

I think it is ready for review, I think further optimization and cleaning is possible, but I prefer to do it after you reviewed it. Keep in mind I propose to only introduce this in 1.0. Also, the dependency on tibble and R6 should be too much of a problem because they are both dependencies of dplyr, which will be introduced with the tidyverse anyway. R6 classes have a nice lightweight profile, and act more like classical OOP where data and methods are kept together. I first tried to implement it as an S3 class but ended up needlessly cluttering the interface with a lot of auxiliary methods that R6 just doesn't need.