Closed rabutler-usbr closed 6 years ago
Merging #91 into master will increase coverage by
0.47%
. The diff coverage is95.07%
.
@@ Coverage Diff @@
## master #91 +/- ##
==========================================
+ Coverage 87.96% 88.44% +0.47%
==========================================
Files 23 25 +2
Lines 1288 1575 +287
==========================================
+ Hits 1133 1393 +260
- Misses 155 182 +27
Impacted Files | Coverage Δ | |
---|---|---|
R/zzz.R | 0% <0%> (ø) |
:arrow_up: |
src/RWDataPlyr_init.c | 100% <100%> (ø) |
|
R/rdf_helperFunctions.R | 58.82% <100%> (ø) |
:arrow_up: |
R/rw_scen_aggregate.R | 90.1% <100%> (+1.81%) |
:arrow_up: |
R/rwslot_aggregations.R | 100% <100%> (ø) |
:arrow_up: |
R/rdf_aggregate.R | 96.07% <100%> (-0.38%) |
:arrow_down: |
R/read_rdf.R | 86.48% <46.66%> (ø) |
|
R/rdf_to_rwtbl.R | 93.42% <86.84%> (-6.58%) |
:arrow_down: |
src/rwtbl.cpp | 99.56% <99.56%> (ø) |
|
R/apply_period.R | 84.21% <0%> (-12.62%) |
:arrow_down: |
... and 18 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 2117f4e...d87a799. Read the comment docs.
rdf_to_rwtbl2()
, was added to try and improve performance ofrdf_aggregate()
, andrw_scen_aggregate()
. (#85) These functions were shown to be about 6x - 7x slower thangetDataForAllScens()
for the same aggregation. The new function calls a C++ version that creates the tbl_df, while maintaining the same information asrdf_to_rwtbl()
. The API for the new function is slighly different; the first argument is now a path to an rdf file, rather than an already read inrdf
object. Otherwise, the same options are available. The C++ version ofrdf_to_twbl()
is about 20x faster than the R version. However,rdf_aggregate()
, andrw_scen_aggregate()
are still about 4x slower thangetDataForAllScens()
, indicating that there is still some necesary work to get closer speeds between the two functions (#90). As part of this work, the following modifications to other functions were made:rw_scen_aggregate()
andrdf_aggregate()
gaincpp
arguments. By default,rdf_to_rwtbl2()
is used, butrdf_to_rwtbl()
can be foreced by settingcpp = FALSE
.read_rdf()
andread.rdf()
gained anrdf
argument. IfTRUE
(default), it returns anrdf
object, otherwise it returns a character vector.rdf_to_rwtbl()
in favor ofrdf_to_rwtbl2()
rdf_to_rwtbl()
,scenario
is coerced into a character. Typically this is a character, but it was previously left as numeric if specified as a numeric. For easier compatability with C++ and comparsion betweenrdf_to_rwtbl()
andrdf_to_rwtbl2()
, it's now always a character.rdf_aggregate()
andrw_scen_aggregate()
gain averbose
parameter to print out the status of processing multiple scenarios, rdfs, and slots. (#82)Bug fixes
read_rdf()
error messages (#86)rw_scen_aggregate()
will now work with unnamedscenarios
andNULL
scen_names
arguments. (#81)rwslot_*
functions now error if the data passed to them are not regular (January - December or October - September) (#83)rdf_get_slot()
now has a"timespan"
attribute that corresponds to the start and end values of the rdf.rdf_aggregate()
andrw_scen_aggregate()
. Now it is clear that theTimestep
columns is not returned. (#84)