Dynamically Add and Remove Units, Load Multiple Unit Systems#9
Open
billdenney wants to merge 9 commits intopacificclimate:masterfrom
Open
Dynamically Add and Remove Units, Load Multiple Unit Systems#9billdenney wants to merge 9 commits intopacificclimate:masterfrom
billdenney wants to merge 9 commits intopacificclimate:masterfrom
Conversation
The code has been modified to have multiple unit system which can be dynamically added and removed. Functions have been modified to take in extra argument (system name) Following new functions have been added: 1. R_ut_free_system 2. R_ut_system_count 3. R_ut_list_systems 4. R_ut_system_cleanup
Functions have been modified to take and pass an extra argument (system name) Following new functions have been added: 1. .onUnload 2. ud.free.system 3. ud.add.system 4. ud.list.systems
Following functions have been added: 1. R_ut_remove_unit: function to remove a specified unit in a system 2. R_ut_set_conversion: function to add a specified unit in a system and set the conversion rule 3. get_unit: function called from 'R_ut_set_conversion' applies the conversion based on the function specified by the user
Following two functions have been added: 1. ud.set.conversion : To add a new unit and set the conversion rule 2. ud.remove.unit : To remove a unit from the system.
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.
As discussed in #4, this pull request adds the feature to be able to add new unit conversions. In addition to that, it adds the ability to have multiple unit systems in place so that a new unit conversion can be added to one unit system but not another, for instance.
On top of those feature changes, I've also moved the documentation to a roxygen2-style format within the code. All previous documentation was moved as-is (or just correcting some minor typos).
Most of the programming was done by @SwechhyaBista.
The intent of these changes was to maintain your goal of this being a "thin wrapper" as mentioned in #4; we tried to add minimal code on top of linking the C-level functions from the library to R. If it doesn't match that goal in your opinion, please let us know how we can make it fit with your intent.