Technomics / readflexfile

An R package to read the Flex File data format.
GNU General Public License v3.0
2 stars 1 forks source link

Add check and a warning for missing allocations that do not sum to 100% #54

Open ahjames11 opened 1 year ago

ahjames11 commented 1 year ago

Something like:

ff$AllocationComponents %>% 
  group_by(AllocationMethodID) %>% 
  summarize(PercentValue = sum(PercentValue)) %>% 
  filter(PercentValue != 1)

And then check if nrow() > 0. Issue a warning if so.

Also might want to add an argument to allow "rebaselining" of the allocations to correct. In other words, divide allocations by the sum.