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

Uniform reading/writing global.dcf in tests #184

Closed Hugovdberg closed 7 years ago

Hugovdberg commented 7 years ago

Several tests were failing locally because read.dcf was used to read config/global.dcf without all = TRUE, but then accessed as a data.frame. This PR removes all variants of read.dcf, read.dcf(all=TRUE) and as.data.frame(read.dcf(...)) with the internal .read.config. Similarly .write.dcf has been replaced with .write.config where applicable. Using read.dcf directly returns a matrix by default, by accessing it as a list the matrix was converted to a list, however, losing the names. The dcf that was written therefore contained only variables like X.1, X.2, ... Furthermore a lot of whitespace was cleaned up according to the Rstudio project settings.