diff --git a/DESCRIPTION b/DESCRIPTION index 536dff49..8569c779 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 Description: mrprom can be run standalone or (preferably) in diff --git a/R/readPRIMESPROCTECH.R b/R/readPRIMESPROCTECH.R new file mode 100644 index 00000000..bd0ee070 --- /dev/null +++ b/R/readPRIMESPROCTECH.R @@ -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) +} \ No newline at end of file diff --git a/man/readPRIMESPROCTECH.Rd b/man/readPRIMESPROCTECH.Rd new file mode 100644 index 00000000..4049ef9a --- /dev/null +++ b/man/readPRIMESPROCTECH.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/readPRIMESPROCTECH.R +\name{readPRIMESPROCTECH} +\alias{readPRIMESPROCTECH} +\title{readPRIMESPROCTECH} +\usage{ +readPRIMESPROCTECH() +} +\value{ +The read-in data into magpie object. +} +\description{ +Read PRIMES tech data and convert it to a magpie object +} +\examples{ +\dontrun{ +a <- readSource("PRIMESPROCTECH") +} + +} +\author{ +Anastasis Giannousakis, Fotis Sioutas, Giannis Tolios +}