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 @@
Many thanks to the following organizations that have provided
fundings for strenghtening the geosapi
package: