Closed ThierryO closed 5 years ago
Really well done, impressive! I've proposed a few vignette updates in PR #4
I could only find a small (luxury?) problem with the way variables are sorted. To be regarded as a feature request. I expect that users often put their variables in some meaningful, desired order, but this may not always coincide with their desired order of variables for sorting the rows. So for this usecase, after using read_vc()
, the user would need to reorder the variables each time to get back the original order of the variables.
So perhaps it is worth considering the ability to store both the original order of the variables and the preferred order of sorting variables in the yml file separately.
The sorting request is solved in 4d352cd. The order of the columns at the time of writing the metadata will be used.
Is therer any specific reason for the usage of the S4 approach using the setGeneric
and setMethod
pattern?
I like to use S4. It is more strict and rigid than S3.
readr is now used to read and write the plain text files. This will break old stuff, but since I'm probably the only user, it won't bug other people ;-)
Benefits:
R/write_vc.R:150:61: style: Commas should never have a space before.
raw_data <- raw_data[do.call(order, raw_data[sorting]), , drop = FALSE]
~^
tests/testthat/test_b_special.R:21:19: style: Commas should never have a space before.
ds[order(ds$a), , drop = FALSE],
~^
tests/testthat/test_b_special.R:31:19: style: Commas should never have a space before.
ds[order(ds$a), , drop = FALSE],
~^
R/write_vc.R:150:61: style: Commas should never have a space before.
raw_data <- raw_data[do.call(order, raw_data[sorting]), , drop = FALSE]
~^
tests/testthat/test_b_special.R:21:19: style: Commas should never have a space before.
ds[order(ds$a), , drop = FALSE],
~^
tests/testthat/test_b_special.R:31:19: style: Commas should never have a space before.
ds[order(ds$a), , drop = FALSE],
~^
R/write_vc.R:150:61: style: Commas should never have a space before.
raw_data <- raw_data[do.call(order, raw_data[sorting]), , drop = FALSE]
~^
tests/testthat/test_b_special.R:21:19: style: Commas should never have a space before.
ds[order(ds$a), , drop = FALSE],
~^
tests/testthat/test_b_special.R:31:19: style: Commas should never have a space before.
ds[order(ds$a), , drop = FALSE],
~^
Codecov Report
100% <ø> (ø)
100% <ø> (ø)
100% <ø> (ø)
100% <100%> (ø)
100% <100%> (ø)
100% <100%> (ø)
100% <100%> (ø)
Continue to review full report at Codecov.