pik-piam / quitte

Bits and pieces of code to use with quitte-style data frames
0 stars 10 forks source link

Add argument in calc_addVariable whether to overwrite existing values #62

Closed aodenweller closed 1 year ago

aodenweller commented 1 year ago

This PR includes an additional argument overwrite in the calc_addVariable function.

If set to TRUE, the default and current behaviour, values will be overwritten if they already exist.

If set to FALSE, values will not be overwritten if they already exist.

I found this helpful when dealing with incomplete reporting from e.g. the AR6 database, when sometimes you want to calculate a value only if it isn't reported already.

This PR should not change the default behaviour of the function.

Please check for errors as I'm certainly not a quitte expert. Thanks!

aodenweller commented 1 year ago

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q please kindly check my changes again. Thanks!