Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mrprom
Type: Package
Title: Functions for generating input data for OPEN-PROM
Version: 1.0.2
Version: 1.1.0
Author: Anastasis Giannousakis, Fotis Sioutas, Giannis Tolios
Maintainer: Fotis Sioutas <sioutas@e3modelling.com>
Description: mrprom can be run standalone or (preferably) in
Expand Down
34 changes: 34 additions & 0 deletions R/readPRIMESPROCTECH.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#' readPRIMESPROCTECH
#'
#' Read PRIMES tech data and convert it to a magpie object
#'
#' @return The read-in data into magpie object.
#'
#' @author Anastasis Giannousakis, Fotis Sioutas, Giannis Tolios
#'
#' @examples
#' \dontrun{
#' a <- readSource("PRIMESPROCTECH")
#' }
#'
#' @importFrom quitte as.quitte
#' @importFrom readxl read_excel

readPRIMESPROCTECH <- function() {

x <- read_excel("PrindV6_process_techdata.xlsx",
sheet = "ProcessTech", range = "A2:AS291")

df <- x[1 : 235, c(1, 2, 3, 4, 5, 36, 37, 38, 39, 6, 7, 10, 15)]

names(df) <- sub("...1", "variable", names(df))
names(df) <- sub("...2", "process", names(df))
names(df) <- sub("...39", "EUR/t", names(df))
names(df) <- sub("...36", "variable_sum", names(df))
names(df) <- sub("Lifetprocess020", "Lifetime2020", names(df))
names(df) <- sub("Inv_costvariable5", "Inv_cost_ORD", names(df))

df <- as.magpie(df)

return(df)
}
23 changes: 23 additions & 0 deletions man/readPRIMESPROCTECH.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.