Skip to content

Commit

Permalink
fix minor issues for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed May 2, 2022
1 parent 6f939e5 commit 5b0a626
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions R/GSLayer.R
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand All @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion R/GSLayerGroup.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/GSManager.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<a href="https://unepgrid.ch/en"><img height=100 width=200 src="https://www.weadapt.org/sites/weadapt.org/files/styles/large/public/screenshot_2021-05-25_at_16.19.32_0.png?itok=iiEMf_S3"></a><a href="http://www.fao.org"><img height=100 width=200 src="http://www.fao.org/fileadmin/templates/family-farming-decade/images/FAO-IFAD-Logos/FAO-Logo-EN.svg"></a>
<a href="https://unepgrid.ch/en"><img height=100 width=200 src="https://www.weadapt.org/sites/weadapt.org/files/styles/large/public/screenshot_2021-05-25_at_16.19.32_0.png?itok=iiEMf_S3"></a><a href="https://www.fao.org/home/en/"><img height=100 width=200 src="https://www.fao.org/fileadmin/templates/family-farming-decade/images/FAO-IFAD-Logos/FAO-Logo-EN.svg"></a>
2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5b0a626

Please sign in to comment.