diff --git a/.buildlibrary b/.buildlibrary index 088ea62dc..f1f4899d0 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '5396320' +ValidationKey: '5415219' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/.zenodo.json b/.zenodo.json index ae6a614ff..627eecd0c 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "mrmagpie: madrat based MAgPIE Input Data Library", - "version": "0.29.0", + "version": "0.29.1", "description": "
Provides functions for MAgPIE country and cellular input data generation.<\/p>",
"creators": [
{
diff --git a/DESCRIPTION b/DESCRIPTION
index 037959dd1..cec50cf9f 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: mrmagpie
Type: Package
Title: madrat based MAgPIE Input Data Library
-Version: 0.29.0
-Date: 2020-12-12
+Version: 0.29.1
+Date: 2020-12-13
Authors@R: c(person("Kristine", "Karstens", email = "karstens@pik-potsdam.de", role = c("aut","cre")),
person("Jan Philipp", "Dietrich", email = "dietrich@pik-potsdam.de", role = "aut"),
person("David", "Chen", role = "aut"),
diff --git a/NAMESPACE b/NAMESPACE
index 10687d663..589b2957c 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -79,6 +79,7 @@ importFrom(raster,as.matrix)
importFrom(raster,brick)
importFrom(raster,extent)
importFrom(raster,extract)
+importFrom(raster,levels)
importFrom(raster,projectRaster)
importFrom(raster,raster)
importFrom(raster,rasterToPoints)
diff --git a/R/readIPCCClimate.R b/R/readIPCCClimate.R
index 575737634..47f2d42da 100644
--- a/R/readIPCCClimate.R
+++ b/R/readIPCCClimate.R
@@ -9,16 +9,16 @@
#' readSource("IPCCClimate", convert="onlycorrect")
#' }
#'
-#' @importFrom raster raster aggregate extract
+#' @importFrom raster raster aggregate extract levels
readIPCCClimate <- function(){
raster_1d12 <- raster("CLIMATE_ZONE.rst")
zone_names <- as.character(levels(raster_1d12)[[1]]$Class_name)
- raster_1d2 <- aggregate(raster_1d12, fact=6, fun=max) # to avoid gaps (since 0 is NA)
+ raster_1d2 <- raster::aggregate(raster_1d12, fact=6, fun=max) # to avoid gaps (since 0 is NA)
map <- as.data.frame(magpie_coord)
- mag <- clean_magpie(as.magpie(extract(raster_1d2,map), spatial=1))
+ mag <- clean_magpie(as.magpie(raster::extract(raster_1d2,map), spatial=1))
#map[mag==0] <- 6
cellNames <- toolMappingFile(type="cell",name="CountryToCellMapping.csv",readcsv=TRUE)$celliso
getNames(mag) <- "NA"
diff --git a/README.md b/README.md
index 177107d3b..dcfc0d99b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# madrat based MAgPIE Input Data Library
-R package **mrmagpie**, version **0.29.0**
+R package **mrmagpie**, version **0.29.1**
@@ -38,8 +38,8 @@ In case of questions / problems please contact Kristine Karstens