Comments (2)
Noticed this as well. Would be great if that was fixed, at least with the option only.new = TRUE
. Maybe @0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q can have look, would be appreciated.
from quitte.
Is this intended or a bug?
calc_addVariable()
reimplements calcAddVariabe()
. It didn't work there, so it doesn't work here.
I would actually like the function to overwrite the old variable by the newly calculated one. Unit conversions would be a classic application of this functionality.
It's not too complicated to do this.
> quitte_example_data |>
+ filter(first(scenario) == scenario,
+ first(region) == region,
+ first(period) == period,
+ variable %in% c('Consumption', 'Population')) |>
+ print() |>
+ mutate(
+ value = value * ifelse('Consumption' == variable, 1e-3, 1),
+ unit = ifelse('Consumption' == variable, 'trillion US$2005/yr',
+ as.character(unit)))
# A tibble: 2 × 7
model scenario region variable unit period value
<fct> <fct> <fct> <fct> <fct> <int> <dbl>
1 REMIND r7552c_1p5C_Def-rem-5 AFR Consumption billion US$2005/yr 2005 618.
2 REMIND r7552c_1p5C_Def-rem-5 AFR Population million 2005 710.
# A tibble: 2 × 7
model scenario region variable unit period value
<fct> <fct> <fct> <fct> <chr> <int> <dbl>
1 REMIND r7552c_1p5C_Def-rem-5 AFR Consumption trillion US$2005/yr 2005 0.618
2 REMIND r7552c_1p5C_Def-rem-5 AFR Population million 2005 710.
Will put this on the list of thing I'll do when all of a sudden there is nothing else that needs doing.
from quitte.
Related Issues (18)
- quitte::read.quitte() return object not recognized by tidyr::pivot_wider() as tibble HOT 2
- character.data.frame returns malformed column names HOT 1
- bug in calc_addVariable causing wrong additional output HOT 1
- sum_total() subsets wrong groups
- interpolate_missing_periods {quitte} docu mismatch HOT 1
- calc_addVariable(): problem with "completeMissing = TRUE"
- [Feature request] fast way to read subset of variables into quitte df HOT 3
- vignette review HOT 3
- add a comment header in mif file with a few lines of metadata (if mif is produced on the cluster)
- warning from replace_column with ambigous mask HOT 4
- Too much filling by completeMissing in calc_addVariable? HOT 2
- write.mif could support append
- inpolate_missing_periods falsly extrapolates in particular cases HOT 1
- default handling of Inf in read.quitte HOT 2
- build fail - depreciation warning from forcats HOT 2
- Requirement for forcats >= 1.0.0 missing
- in quitteSort, sort levels alphabetically
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quitte.