Skip to content

Commit

Permalink
SSDM 0.2.1 CRAn release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain SCHMITT committed Mar 22, 2017
1 parent bcb811b commit 7dba463
Show file tree
Hide file tree
Showing 10 changed files with 995 additions and 977 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: SSDM
Type: Package
Title: Stacked Species Distribution Modelling
Version: 0.1.9040
Version: 0.2.1
Author: Sylvain Schmitt, Robin Pouteau, Dimitri Justeau, Philippe Birnbaum
Maintainer: Sylvain Schmitt <[email protected]>
URL: https://github.com/sylvainschmitt/SSDM
Expand Down
2 changes: 1 addition & 1 deletion NEWS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ output: github_document
- update in check args

# SSDM 0.1.9031
- `rgdal`issue on travis due to `test_load_vocc`
- `rgdal`issue on travis due to `test_load_occ`

# SSDM 0.1.9030
- `rgdal`issue on travis due to `load_var`
Expand Down
2 changes: 1 addition & 1 deletion R/Env.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @references R.J. Hijmans, C.H. & Graham (2006) "The ability of climate
#' envelope models to predict the effect of climate change on species
#' distributions." \emph{Global Change Biology} 12:2272-2281
#' \url{http://se-server.ethz.ch/staff/af/Fi159/H/Hi082_S.pdf}
#' \url{http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2486.2006.01256.x/full}
#'
#' E. Fritsch (2012) "Les sols. Atlas de la Nouvelle-Caledonie (ed. by J.
#' Bonvallot, J.-C. Gay and E. Habert)" \emph{IRD-Congres de la
Expand Down
18 changes: 12 additions & 6 deletions R/gui.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#' \code{\link[shiny]{runApp}} for more details).
#' @param host char. The IPv4 address that the application should listen on (see
#' \code{\link[shiny]{runApp}} for more details).
#' @param working.directory char. Directory in which the application will run.
#'
#' @return Open a window with a shiny app to use the SSDM package with an
#' user-friendly interface.
Expand All @@ -20,13 +21,18 @@
#' }
#'
#' @export
gui <- function (port = getOption("shiny.port"), host = getOption("shiny.host", "127.0.0.1")) {
gui <- function (port = getOption("shiny.port"),
host = getOption("shiny.host", "127.0.0.1"),
working.directory = getwd()) {

appDir <- system.file("shiny", "gui", package = "SSDM")
if (appDir == "") {
stop("Could not find example directory. Try re-installing `mypackage`.", call. = FALSE)
stop("Could not find shiny directory. Try re-installing `SSDM`.", call. = FALSE)
}
assign("working.directory", getwd(), envir = .GlobalEnv)
shiny::runApp(appDir, display.mode = "normal", port = port, host = host)
ls()
rm(working.directory, envir = .GlobalEnv)

ui <- source(file.path(appDir, 'ui.R'))
serverWD <- source(file.path(appDir, 'server.R'))
shiny::runApp(shinyApp(ui = ui, server = serverWD(working.directory)),
display.mode = "normal", port = port, host = host)
rm(ui, serverWD, envir = .GlobalEnv)
}
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ output: github_document
---

[![Travis-CI Build Status](https://travis-ci.org/sylvainschmitt/SSDM.svg?branch=master)](https://travis-ci.org/sylvainschmitt/SSDM)
[![CRAN](http://www.r-pkg.org/badges/version/SSDM)](http://cran.rstudio.com/package=SSDM) [![Downloads](http://cranlogs.r-pkg.org/badges/SSDM?color=brightgreen)](http://www.r-pkg.org/pkg/SSDM)
[![CRAN](https://www.r-pkg.org/badges/version/SSDM)](https://CRAN.R-project.org/package=SSDM)
[![Downloads](http://cranlogs.r-pkg.org/badges/SSDM?color=brightgreen)](http://www.r-pkg.org/pkg/SSDM)
[![Coverage Status](https://img.shields.io/codecov/c/github/sylvainschmitt/SSDM/master.svg)](https://codecov.io/github/sylvainschmitt/SSDM?branch=master)
[![Research software impact](http://depsy.org/api/package/cran/SSDM/badge.svg)](http://depsy.org/package/r/SSDM)

Expand Down Expand Up @@ -41,7 +42,7 @@ install.packages("SSDM")
After installing, **SSDM** package, you can launch the graphical user interface by typing gui() in the console.

<center>[**Click to enlarge**](https://raw.githubusercontent.com/sylvainschmitt/SSDM/master/examples/SSDM.gif)<center>
![Screenshot](examples/SSDM.gif)
![Screenshot](https://raw.githubusercontent.com/sylvainschmitt/SSDM/master/examples/SSDM.gif)

# Functionnalities

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SSDM: Stacked species distribution modelling
================

[![Travis-CI Build Status](https://travis-ci.org/sylvainschmitt/SSDM.svg?branch=master)](https://travis-ci.org/sylvainschmitt/SSDM) [![CRAN](http://www.r-pkg.org/badges/version/SSDM)](http://cran.rstudio.com/package=SSDM) [![Downloads](http://cranlogs.r-pkg.org/badges/SSDM?color=brightgreen)](http://www.r-pkg.org/pkg/SSDM) [![Coverage Status](https://img.shields.io/codecov/c/github/sylvainschmitt/SSDM/master.svg)](https://codecov.io/github/sylvainschmitt/SSDM?branch=master) [![Research software impact](http://depsy.org/api/package/cran/SSDM/badge.svg)](http://depsy.org/package/r/SSDM)
[![Travis-CI Build Status](https://travis-ci.org/sylvainschmitt/SSDM.svg?branch=master)](https://travis-ci.org/sylvainschmitt/SSDM) [![CRAN](https://www.r-pkg.org/badges/version/SSDM)](https://CRAN.R-project.org/package=SSDM) [![Downloads](http://cranlogs.r-pkg.org/badges/SSDM?color=brightgreen)](http://www.r-pkg.org/pkg/SSDM) [![Coverage Status](https://img.shields.io/codecov/c/github/sylvainschmitt/SSDM/master.svg)](https://codecov.io/github/sylvainschmitt/SSDM?branch=master) [![Research software impact](http://depsy.org/api/package/cran/SSDM/badge.svg)](http://depsy.org/package/r/SSDM)

SSDM is a package to map species richness and endemism based on stacked species distribution models (SSDM). Individual SDMs can be created using a single or multiple algorithms (ensemble SDMs). For each species, an SDM can yield a habitat suitability map, a binary map, a between-algorithm variance map, and can assess variable importance, algorithm accuracy, and between-algorithm correlation. Methods to stack individual SDMs include summing individual probabilities and thresholding then summing. Thresholding can be based on a specific evaluation metric or by drawing repeatedly from a Bernouilli distribution. The SSDM package also provides a user-friendly interface `gui`.

Expand Down Expand Up @@ -41,7 +41,7 @@ After installing, **SSDM** package, you can launch the graphical user interface
<center>
[**Click to enlarge**](https://raw.githubusercontent.com/sylvainschmitt/SSDM/master/examples/SSDM.gif)
<center>
![Screenshot](examples/SSDM.gif)
![Screenshot](https://raw.githubusercontent.com/sylvainschmitt/SSDM/master/examples/SSDM.gif)

Functionnalities
================
Expand Down
22 changes: 14 additions & 8 deletions cran-comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@
* win-builder (devel and release)

## R CMD check results
There were no ERRORs, WARNINGs or NOTEs.
There were no ERRORs or WARNINGs.

There was one NOTE:
Possibly mis-spelled words in DESCRIPTION:
SDM (11:73)
SDMs (10:53, 11:45, 14:56)
SSDM (10:34, 17:23)
Thresholding (15:61)
endemism (9:49)
thresholding (15:34)

Those are scientific correctly spelled words of species distribution modelling field (SDM). It follows litterature included in pacakge documentation.

## Resubmission
This is a resubmission. In this version I have:

* Remove the term package in the first sentence of Description field in DESCRIPTION

* Actualized Date field in DESCRIPTION to today

* Import following functions in NAMESPACE : aggregate.data.frame arrows barplot cor glm glm.control heat.colors is.raster legend lsf.str rainbow rbinom read.csv read.csv2 runif sd tail terrain.colors var write.csv

* Unactivated examples with an elapsed time > 5s
* Fixed CRAN URL canonical form in README
* Fixed reported bug on graphic user interface which was broken (on of the main functionality of the package) without assignment to global environment (following recommendations of Joe Chang https://github.com/rstudio/shiny/issues/237#issuecomment-288244875)
Loading

0 comments on commit 7dba463

Please sign in to comment.