From 5b0a6260848a55838f67e4bb18873709616c3e46 Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 2 May 2022 13:14:46 +0200 Subject: [PATCH] fix minor issues for CRAN --- R/GSLayer.R | 4 ++-- R/GSLayerGroup.R | 2 +- R/GSManager.R | 2 +- README.md | 2 +- docs/index.html | 2 +- docs/pkgdown.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/R/GSLayer.R b/R/GSLayer.R index 54f2367..33c1806 100644 --- a/R/GSLayer.R +++ b/R/GSLayer.R @@ -132,7 +132,7 @@ GSLayer <- R6Class("GSLayer", #'@param style style, object o class \link{GSStyle} or \code{character} #'@return \code{TRUE} if added, \code{FALSE} otherwise addStyle = function(style){ - if(class(style) == "character") style <- GSStyle$new(xml=NULL, name = style) + if(is(style, "character")) style <- GSStyle$new(xml=NULL, name = style) startNb = length(self$styles) availableStyles <- sapply(self$styles, function(x){x$name}) if(length(which(availableStyles == style$name)) == 0){ @@ -146,7 +146,7 @@ GSLayer <- R6Class("GSLayer", #'@param style style, object o class \link{GSStyle} or \code{character} #'@return \code{TRUE} if deleted, \code{FALSE} otherwise delStyle = function(style){ - if(class(style) == "character") style <- GSStyle$new(xml=NULL, name = style) + if(is(style, "character")) style <- GSStyle$new(xml=NULL, name = style) startNb = length(self$styles) availableStyles <- sapply(self$styles, function(x){x$name}) self$styles = self$styles[which(availableStyles != style$name)] diff --git a/R/GSLayerGroup.R b/R/GSLayerGroup.R index 7cab5b0..cb12d59 100644 --- a/R/GSLayerGroup.R +++ b/R/GSLayerGroup.R @@ -197,7 +197,7 @@ GSLayerGroup <- R6Class("GSLayerGroup", #'@param style style #'@return \code{TRUE} if added, \code{FALSE} otherwise addStyle = function(style){ - if(class(style) == "character") style <- GSStyle$new(xml=NULL, name = style) + if(is(style, "character")) style <- GSStyle$new(xml=NULL, name = style) startNb = length(self$styles) self$styles = c(self$styles, style) endNb = length(self$styles) diff --git a/R/GSManager.R b/R/GSManager.R index a113d1c..deb02cc 100644 --- a/R/GSManager.R +++ b/R/GSManager.R @@ -178,7 +178,7 @@ GSManager <- R6Class("GSManager", list_of_methods <- rev(names(man)) for(method in list_of_methods){ methodObj <- man[[method]] - if(!(method %in% names(self)) && class(methodObj) == "function"){ + if(!(method %in% names(self)) && is(methodObj,"function")){ self[[method]] <- methodObj environment(self[[method]]) <- environment(self$connect) } diff --git a/README.md b/README.md index ef8aa59..a40402c 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ A user manual is available at [https://github.com/eblondel/geosapi/wiki](https:/ Many thanks to the following organizations that have provided fundings for strenghtening the ``geosapi`` package: - + diff --git a/docs/index.html b/docs/index.html index 1cd6f0a..10f70a1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -93,7 +93,7 @@

Sponsors

Many thanks to the following organizations that have provided fundings for strenghtening the geosapi package:

-

+

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 8d2ee0a..95c5a89 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,5 +2,5 @@ pandoc: 2.17.1.1 pkgdown: 2.0.2 pkgdown_sha: ~ articles: {} -last_built: 2022-05-02T08:16Z +last_built: 2022-05-02T11:10Z