Skip to content

Commit

Permalink
Merge pull request #541 from 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q/fix/dim…
Browse files Browse the repository at this point in the history
…Sums_imports

remove maglcass::dimSums() imports
  • Loading branch information
0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q authored Feb 19, 2024
2 parents 2854bbc + e9d0e58 commit 7bc8a53
Show file tree
Hide file tree
Showing 27 changed files with 106 additions and 107 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '224378150'
ValidationKey: '224431972'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'remind2: The REMIND R package (2nd generation)'
version: 1.135.0
date-released: '2024-02-16'
version: 1.135.1
date-released: '2024-02-19'
abstract: Contains the REMIND-specific routines for data and model output manipulation.
authors:
- family-names: Rodrigues
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: remind2
Title: The REMIND R package (2nd generation)
Version: 1.135.0
Date: 2024-02-16
Version: 1.135.1
Date: 2024-02-19
Authors@R: c(
person("Renato", "Rodrigues", , "[email protected]", role = c("aut", "cre")),
person("Lavinia", "Baumstark", role = "aut"),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ importFrom(magclass,collapseNames)
importFrom(magclass,complete_magpie)
importFrom(magclass,dimExists)
importFrom(magclass,dimReduce)
importFrom(magclass,dimSums)
importFrom(magclass,getItems)
importFrom(magclass,getNames)
importFrom(magclass,getRegions)
Expand Down
2 changes: 1 addition & 1 deletion R/calc_regionSubset_sums.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @return A [`MAgPIE`][magclass::magclass] object.
#' @author Michaja Pehl
#'
#' @importFrom magclass mbind dimSums getItems<-
#' @importFrom magclass mbind getItems<-
#'
#'
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/readConsumption.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass mbind dimSums getNames<-
#' @importFrom magclass mbind getNames<-

readConsumption <- function(gdx, field="l"){
tmp <- readGDX(gdx, name='vm_cons', field=field, format="first_found")
Expand Down
2 changes: 1 addition & 1 deletion R/readEmissions.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass dimSums setNames getNames<-
#' @importFrom magclass setNames getNames<-
readEmissions <- function(gdx,emiengregi,eminegregi){
if(!is.null(emiengregi)){
tmp1 <- readGDX(gdx, name = c("vm_emiTe","vm_emiengregi"), field="l", format="first_found")[ , , emiengregi]
Expand Down
2 changes: 1 addition & 1 deletion R/readFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass dimSums getNames<-
#' @importFrom magclass getNames<-
readFE <- function(gdx){
fe <- readGDX(gdx,c("vm_prodFe","v_feprod"),field="l",restore_zeros = FALSE,react="silent")
fe <- dimSums(fe,dim=3)
Expand Down
2 changes: 1 addition & 1 deletion R/reportCapacity.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' @importFrom quitte calcCumulatedDiscount
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass mbind setNames dimSums getSets getSets<- as.magpie
#' @importFrom magclass mbind setNames getSets getSets<- as.magpie
#' @importFrom dplyr %>% filter mutate

reportCapacity <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq(2070, 2110, 10), 2130, 2150)) {
Expand Down
2 changes: 1 addition & 1 deletion R/reportCapitalStock.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass getYears mbind setNames dimSums
#' @importFrom magclass getYears mbind setNames
#' @importFrom dplyr tribble
reportCapitalStock <- function(gdx,regionSubsetList=NULL,t=c(seq(2005,2060,5),seq(2070,2110,10),2130,2150)) {

Expand Down
2 changes: 1 addition & 1 deletion R/reportCosts.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#'
#' @export
#' @importFrom rlang .data
#' @importFrom magclass mbind getYears collapseNames dimSums setNames
#' @importFrom magclass mbind getYears collapseNames setNames
#' @importFrom gdx readGDX
#' @importFrom dplyr filter

Expand Down
2 changes: 1 addition & 1 deletion R/reportCrossVariables.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @export
#' @importFrom assertr assert not_na
#' @importFrom gdx readGDX
#' @importFrom magclass getYears getRegions mbind setNames dimSums mselect
#' @importFrom magclass getYears getRegions mbind setNames mselect
#' new.magpie setYears mcalc
#' @importFrom luscale speed_aggregate
#' @importFrom tibble as_tibble
Expand Down
2 changes: 1 addition & 1 deletion R/reportEmi.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @importFrom gdx readGDX
#' @importFrom dplyr %>% filter full_join group_by inner_join left_join mutate rename select summarise
#' @importFrom magclass mselect dimSums mselect<- collapseDim getItems getRegions getYears
#' @importFrom magclass mselect mselect<- collapseDim getItems getRegions getYears
#' @importFrom madrat toolAggregate
#' @importFrom tibble as_tibble

Expand Down
154 changes: 77 additions & 77 deletions R/reportEmiAirPol.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion R/reportEnergyInvestment.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' }
#'
#' @export
#' @importFrom magclass dimSums mbind
#' @importFrom magclass mbind
#' @importFrom gdx readGDX

reportEnergyInvestment <- function(gdx, regionSubsetList = NULL, t = c(seq(2005, 2060, 5), seq(2070, 2110, 10), 2130, 2150)) {
Expand Down
2 changes: 1 addition & 1 deletion R/reportExtraction.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @importFrom quitte calcCumulatedDiscount
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass mbind dimSums mselect getRegions new.magpie getYears<- getYears setNames getSets getSets<- as.magpie
#' @importFrom magclass mbind mselect getRegions new.magpie getYears<- getYears setNames getSets getSets<- as.magpie
#' @importFrom dplyr %>% filter mutate
#' @importFrom tidyr extract

Expand Down
2 changes: 1 addition & 1 deletion R/reportFE.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass new.magpie mselect getRegions getYears mbind setNames
#' dimSums getNames<- as.data.frame as.magpie getSets
#' getNames<- as.data.frame as.magpie getSets
#' @importFrom dplyr %>% filter full_join group_by left_join mutate rename
#' select semi_join summarise ungroup
#' @importFrom quitte inline.data.frame revalue.levels
Expand Down
2 changes: 1 addition & 1 deletion R/reportLCOE.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass new.magpie dimSums getRegions getYears getNames setNames clean_magpie dimReduce as.magpie magpie_expand
#' @importFrom magclass new.magpie getRegions getYears getNames setNames clean_magpie dimReduce as.magpie magpie_expand
#' @importFrom dplyr %>% mutate select rename group_by ungroup right_join filter full_join arrange summarise
#' @importFrom quitte as.quitte overwrite getRegs getPeriods
#' @importFrom tidyr spread gather expand fill
Expand Down
2 changes: 1 addition & 1 deletion R/reportMOFEX.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#'
#' @export
#' @importFrom rlang .data
#' @importFrom magclass mbind getYears collapseNames dimSums setNames mselect as.magpie write.report
#' @importFrom magclass mbind getYears collapseNames setNames mselect as.magpie write.report
#' @importFrom gdx readGDX
#' @importFrom dplyr filter
#' @importFrom ggplot2 ggplot aes labs geom_area geom_line geom_col scale_fill_brewer facet_grid theme_minimal
Expand Down
2 changes: 1 addition & 1 deletion R/reportMacroEconomy.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass setNames mbind getYears dimSums new.magpie getRegions setYears
#' @importFrom magclass setNames mbind getYears new.magpie getRegions setYears

reportMacroEconomy <- function(gdx, regionSubsetList = NULL,
t = c(seq(2005, 2060, 5), seq(2070, 2110, 10), 2130, 2150)) {
Expand Down
2 changes: 1 addition & 1 deletion R/reportPE.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass mselect getYears dimSums getNames<- mbind setNames
#' @importFrom magclass mselect getYears getNames<- mbind setNames

reportPE <- function(gdx,regionSubsetList=NULL,t=c(seq(2005,2060,5),seq(2070,2110,10),2130,2150)){
####### conversion factors ##########
Expand Down
2 changes: 1 addition & 1 deletion R/reportPolicyCosts.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass getYears mbind dimSums setNames
#' @importFrom magclass getYears mbind setNames
reportPolicyCosts <- function(gdx,gdx_ref,regionSubsetList=NULL,t=c(seq(2005,2060,5),seq(2070,2110,10),2130,2150)){
####### read in needed data #########
## sets
Expand Down
2 changes: 1 addition & 1 deletion R/reportPrices.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' @importFrom luscale speed_aggregate
#' @importFrom dplyr %>% case_when distinct filter inner_join tibble left_join rename
#' @importFrom gdx readGDX
#' @importFrom magclass mbind getYears getRegions setNames dimExists dimSums new.magpie lowpass complete_magpie getItems<- getNames
#' @importFrom magclass mbind getYears getRegions setNames dimExists new.magpie lowpass complete_magpie getItems<- getNames
#' @importFrom quitte df.2.named.vector getColValues
#' @importFrom readr read_csv
#' @importFrom madrat toolAggregate
Expand Down
2 changes: 1 addition & 1 deletion R/reportSE.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass mselect getSets getSets<- getYears dimSums getNames<- mbind
#' @importFrom magclass mselect getSets getSets<- getYears getNames<- mbind
#' @importFrom abind abind
#' @importFrom rlang sym

Expand Down
2 changes: 1 addition & 1 deletion R/reportTax.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass mbind getYears getNames setNames dimSums setItems
#' @importFrom magclass mbind getYears getNames setNames setItems

reportTax <- function(gdx,output=NULL,regionSubsetList=NULL,t=c(seq(2005,2060,5),seq(2070,2110,10),2130,2150)){
# old tax reporting was deleted, stop if old tax reporting would be needed
Expand Down
2 changes: 1 addition & 1 deletion R/reportTrade.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#'
#' @export
#' @importFrom gdx readGDX
#' @importFrom magclass getYears setNames mbind dimSums
#' @importFrom magclass getYears setNames mbind

reportTrade <- function(gdx,regionSubsetList=NULL,t=c(seq(2005,2060,5),seq(2070,2110,10),2130,2150)) {

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The REMIND R package (2nd generation)

R package **remind2**, version **1.135.0**
R package **remind2**, version **1.135.1**

[![CRAN status](https://www.r-pkg.org/badges/version/remind2)](https://cran.r-project.org/package=remind2) [![R build status](https://github.com/pik-piam/remind2/workflows/check/badge.svg)](https://github.com/pik-piam/remind2/actions) [![codecov](https://codecov.io/gh/pik-piam/remind2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/remind2) [![r-universe](https://pik-piam.r-universe.dev/badges/remind2)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues <renato.rodrigue

To cite package **remind2** in publications use:

Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Duerrwaechter J, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.135.0, <URL: https://github.com/pik-piam/remind2>.
Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Duerrwaechter J, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P (2024). _remind2: The REMIND R package (2nd generation)_. R package version 1.135.1, <https://github.com/pik-piam/remind2>.

A BibTeX entry for LaTeX users is

Expand All @@ -58,7 +58,7 @@ A BibTeX entry for LaTeX users is
title = {remind2: The REMIND R package (2nd generation)},
author = {Renato Rodrigues and Lavinia Baumstark and Falk Benke and Jan Philipp Dietrich and Alois Dirnaichner and Jakob Duerrwaechter and Pascal Führlich and Anastasis Giannousakis and Robin Hasse and Jérome Hilaire and David Klein and Johannes Koch and Katarzyna Kowalczyk and Antoine Levesque and Aman Malik and Anne Merfort and Leon Merfort and Simón Morena-Leiva and Michaja Pehl and Robert Pietzcker and Sebastian Rauner and Oliver Richters and Marianna Rottoli and Christof Schötz and Felix Schreyer and Kais Siala and Björn Sörgel and Mike Spahr and Jessica Strefler and Philipp Verpoort and Pascal Weigmann},
year = {2024},
note = {R package version 1.135.0},
note = {R package version 1.135.1},
url = {https://github.com/pik-piam/remind2},
}
```

0 comments on commit 7bc8a53

Please sign in to comment.