Conversation
Let the function decide whether to call FUN for each row in data or only for the unique value combinations of the relevant columns. Add utility functions: - expand_to_vector() - n_dims() - rbind_first_rows() - seq_along_rows() - split_into_identical_rows()
Rewrite call_with_data()
if x is out of the range. Otherwise NA was returned which caused errors later on.
and correct the stop expression: not the value to be looked up in the vector needs to be in a certain range but the index.
-> avoid repetition of "result"
and acess input columns safely using helper functions
as it is done in the C++ code!
Handle waterbody: return potential evaporation
and not the whole configuration list. Do not create element "potentialEvaporation" in getDefaultConfiguration() any more. Instead, use what abimo_config_to_config() returns.
It is not needed any more
Clean config
Improve interface to call_with_data()
define lookup tables globally: LOOKUP_G001 SUMMER_CURRECTION_MATRIX -> matrix instead of data frame rename getEffectivityParameter() to determineBagrovParameter() rename effectivity/efficiency to bagrovParameter
# Conflicts: # R/realEvapoTranspiration.R # man/realEvapoTranspiration.Rd
and all of its subfunctions
I was using the code from the clean-bagrov branch of https://github.com/KWB-R/abimo
calculate days of growth out of the function
Vectorise
interpolate_cpp() is the more or less direct translation from C++ code to R. interpolate() is the vectorised R version (hopefully returning the same)
for simplicity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.