From aec66711ddc4c26658e87b3690081eac4ca4055e Mon Sep 17 00:00:00 2001 From: Jan Philipp Dietrich Date: Mon, 14 Dec 2020 17:53:31 +0100 Subject: [PATCH] fixed problem with unknown UTF-8 code --- .buildlibrary | 2 +- .zenodo.json | 2 +- DESCRIPTION | 4 ++-- R/read.report.R | 4 ++-- README.md | 9 +++++---- man/replace_non_finite.Rd | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index ce1d5d85..d71b13a9 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '95913930' +ValidationKey: '95953160' 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 b1ae4937..1b45a490 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "magclass: Data Class and Tools for Handling Spatial-Temporal Data", - "version": "5.15.5", + "version": "5.15.6", "description": "

Data class for increased interoperability working with spatial-\n temporal data together with corresponding functions and methods (conversions,\n basic calculations and basic data manipulation). The class distinguishes\n between spatial, temporal and other dimensions to facilitate the development\n and interoperability of tools build for it. Additional features are name-based\n addressing of data and internal consistency checks (e.g. checking for the right\n data order in calculations).<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index c217867d..3f8b9977 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: magclass Type: Package Title: Data Class and Tools for Handling Spatial-Temporal Data -Version: 5.15.5 -Date: 2020-12-10 +Version: 5.15.6 +Date: 2020-12-14 Authors@R: c(person("Jan Philipp", "Dietrich", email = "dietrich@pik-potsdam.de", role = c("aut","cre")), person("Benjamin Leon", "Bodirsky", email = "bodirsky@pik-potsdam.de", role = "aut"), person("Markus", "Bonsch", role = "aut"), diff --git a/R/read.report.R b/R/read.report.R index 9d76d381..22a73e2e 100644 --- a/R/read.report.R +++ b/R/read.report.R @@ -86,8 +86,8 @@ read.report <- function(file,as.list=TRUE) { ndots <- nchar(gsub("[^\\.]*","",names)) if(any(ndots!=ndots[1])) names <- gsub("\\.","",names) #replace weird ° in tables after sub function evaluation - names <- sub(pattern="\U3e30623cC",replacement = "K", x = names, useBytes = TRUE) - names(names) <- sub(pattern="\U3e30623cC",replacement = "K", x = names(names), useBytes = TRUE) + names <- sub(pattern="\U{00B0}C",replacement = "K", x = names, useBytes = TRUE) + names(names) <- sub(pattern="\U{00B0}C",replacement = "K", x = names(names), useBytes = TRUE) mag <- new.magpie(sub("ZZZZZZGLO","GLO",(sort(sub("GLO","ZZZZZZGLO",regions)))),years,names) yearelems <- grep("^X[0-9]{4}$",dimnames(tmp)[[2]]) regions[order(sub("GLO","ZZZZZZGLO",regions))] <- dimnames(mag)[[1]] diff --git a/README.md b/README.md index be075ca2..4726948f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Data Class and Tools for Handling Spatial-Temporal Data -R package **magclass**, version **5.15.5** +R package **magclass**, version **5.15.6** [![Travis build status](https://travis-ci.com/pik-piam/magclass.svg?branch=master)](https://travis-ci.com/pik-piam/magclass) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1158580.svg)](https://doi.org/10.5281/zenodo.1158580) [![codecov](https://codecov.io/gh/pik-piam/magclass/branch/master/graph/badge.svg)](https://codecov.io/gh/pik-piam/magclass) @@ -54,8 +54,9 @@ In case of questions / problems please contact Jan Philipp Dietrich . A BibTeX entry for LaTeX users is @@ -65,7 +66,7 @@ A BibTeX entry for LaTeX users is title = {magclass: Data Class and Tools for Handling Spatial-Temporal Data}, author = {Jan Philipp Dietrich and Benjamin Leon Bodirsky and Markus Bonsch and Florian Humpenoeder and Stephen Bi and Kristine Karstens}, year = {2020}, - note = {R package version 5.15.5}, + note = {R package version 5.15.6}, doi = {10.5281/zenodo.1158580}, url = {https://github.com/pik-piam/magclass}, } diff --git a/man/replace_non_finite.Rd b/man/replace_non_finite.Rd index cbe9c54d..970429ca 100644 --- a/man/replace_non_finite.Rd +++ b/man/replace_non_finite.Rd @@ -7,12 +7,12 @@ replace_non_finite(x, replace = 0) } \arguments{ -\item{x}{A vector or \code{\link[magclass:magclass]{magpie}} object.} +\item{x}{A vector or \code{\link[=magclass]{magpie}} object.} \item{replace}{A value to replace non-finite data with.} } \value{ -A vector or \code{\link[magclass:magclass]{magpie}} object, same as \code{x}. +A vector or \code{\link[=magclass]{magpie}} object, same as \code{x}. } \description{ Replaces all instances of non-finite data (\code{NA}, \code{NaN}, \code{Inf}, and \code{-Inf}).