Skip to content

Commit

Permalink
Merge pull request #41 from ropensci/develop
Browse files Browse the repository at this point in the history
ready for CRAN
  • Loading branch information
marcosci authored Apr 3, 2018
2 parents cea0459 + 6360dd2 commit bccd4b5
Show file tree
Hide file tree
Showing 44 changed files with 168 additions and 185 deletions.
2 changes: 0 additions & 2 deletions CRAN-RELEASE

This file was deleted.

8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Package: nlmr
Package: NLMR
Type: Package
Title: Simulating Neutral Landscape Models
Version: 0.3.0
Expand All @@ -15,7 +15,7 @@ Authors@R: c(person("Marco", "Sciaini", email = "[email protected]", role
comment = "Jeffrey reviewed the package for rOpenSci, see
https://github.com/ropensci/onboarding/issues/188"))
Maintainer: Marco Sciaini <[email protected]>
Description: Provides neutral landscape models (<https://doi.org/10.1007/BF02275262>,
Description: Provides neutral landscape models (<doi:10.1007/BF02275262>,
<http://sci-hub.tw/10.1007/bf02275262>).
Neutral landscape models range from "hard"
neutral models (completely random distributed), to "soft" neutral models
Expand Down Expand Up @@ -46,8 +46,8 @@ Imports:
tibble,
fasterize,
sf
URL: https://ropensci.github.io/nlmr/
BugReports: https://github.com/ropensci/nlmr/issues/
URL: https://ropensci.github.io/NLMR/
BugReports: https://github.com/ropensci/NLMR/issues/
Suggests:
testthat,
covr,
Expand Down
3 changes: 1 addition & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ v0.3.0 was released on 26/03/2018
### Changes

- successful review through rOpenSci
- rename the package into lowercase: `nlmr`
- split package into two packages:
- `nlmr`
- `NLMR`
- contains now only the neutral landscape models, minimal dependencies
- [`landscapetools`](https://github.com/marcosci/landscapetools)
- contains now only utility functions
Expand Down
8 changes: 4 additions & 4 deletions R/nlmr.R → R/NLMR.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#' Simulating Neutral Landscape Models
#'
#' \emph{nlmr} is an R package for simulating neutral landscape models (NLMs).
#' \emph{NLMR} is an R package for simulating neutral landscape models (NLMs).
#'
#' @details This package contains vignettes that introduce NLM and basic usage
#' of the \emph{nlmr} package. The vignettes in this package are listed below.
#' of the \emph{NLMR} package. The vignettes in this package are listed below.
#'
#' \describe{
#' \item{\href{https://ropensci.github.io/nlmr/articles/getstarted/}{
#' Quickstart Guide}}{Short walk-through of the \emph{nlmr} package and how to
#' \item{\href{https://ropensci.github.io/NLMR/articles/getstarted.html}{
#' Quickstart Guide}}{Short walk-through of the \emph{NLMR} package and how to
#' handle the simulations.}
#' }
#'
Expand Down
8 changes: 4 additions & 4 deletions R/nlm_mosaictess.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
#'

nlm_mosaictess <- function(ncol,
nrow,
resolution = 1,
germs,
rescale = TRUE) {
nrow,
resolution = 1,
germs,
rescale = TRUE) {

# Check function arguments ----
checkmate::assert_count(ncol, positive = TRUE)
Expand Down
32 changes: 16 additions & 16 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ knitr::opts_chunk$set(
)
```

[![Build Status](https://travis-ci.org/ropensci/nlmr.svg?branch=develop)](https://travis-ci.org/ropensci/nlmr)[![Build status](https://ci.appveyor.com/api/projects/status/djw840fitcvolbxg?svg=true)](https://ci.appveyor.com/project/ropensci/nlmr)
[![codecov](https://codecov.io/gh/ropensci/nlmr/branch/develop/graph/badge.svg?token=MKCm2fVrDa)](https://codecov.io/gh/ropensci/nlmr)
[![Build Status](https://travis-ci.org/ropensci/NLMR.svg?branch=develop)](https://travis-ci.org/ropensci/NLMR)[![Build status](https://ci.appveyor.com/api/projects/status/djw840fitcvolbxg?svg=true)](https://ci.appveyor.com/project/ropensci/NLMR)
[![codecov](https://codecov.io/gh/ropensci/NLMR/branch/develop/graph/badge.svg?token=MKCm2fVrDa)](https://codecov.io/gh/ropensci/NLMR)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/NLMR)](https://cran.r-project.org/package=NLMR)
[![Join the chat at https://gitter.im/nlmr_landscapegenerator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nlmr_landscapegenerator)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![](http://cranlogs.r-pkg.org/badges/grand-total/NLMR)](http://cran.rstudio.com/web/packages/NLMR/index.html)
[![](https://badges.ropensci.org/188_status.svg)](https://github.com/ropensci/onboarding/issues/188)


`nlmr` is an ``R`` package for simulating **n**eutral **l**andscape **m**odels (NLM). Designed to be a generic framework like [NLMpy](https://pypi.python.org/pypi/nlmpy), it leverages the ability to simulate the most common NLM that are described in the ecological literature.
`nlmr` builds on the advantages of the ``raster`` package and returns all simulation as ``RasterLayer`` objects, thus ensuring a direct compability to common GIS tasks and a flexible and simple usage.
`NLMR` is an ``R`` package for simulating **n**eutral **l**andscape **m**odels (NLM). Designed to be a generic framework like [NLMpy](https://pypi.python.org/pypi/nlmpy), it leverages the ability to simulate the most common NLM that are described in the ecological literature.
`NLMR` builds on the advantages of the ``raster`` package and returns all simulation as ``RasterLayer`` objects, thus ensuring a direct compability to common GIS tasks and a flexible and simple usage.
Furthermore, it simulates NLMs within a self-contained, reproducible framework.

## Installation
Expand All @@ -38,29 +38,29 @@ install.packages("NLMR")
__NOTE__: The version on CRAN is pre-rOpenSci review, so it still contains the
utility functions you find now in [`landscapetools`](https://github.com/ropensci/landscapetools).

To install the developmental version of ``nlmr``, use the following R code:
To install the developmental version of ``NLMR``, use the following R code:

```{r eval = FALSE}
# install.packages("devtools")
devtools::install_github("ropensci/nlmr", ref = "develop")
devtools::install_github("ropensci/NLMR", ref = "develop")
```

## Example

Each neutral landscape models is simulated with a single function (all starting with `nlm_`) in `nlmr`, e.g.:
Each neutral landscape models is simulated with a single function (all starting with `nlm_`) in `NLMR`, e.g.:

```{r message=FALSE}
random_cluster <- nlmr::nlm_randomcluster(nrow = 100,
random_cluster <- NLMR::nlm_randomcluster(nrow = 100,
ncol = 100,
p = 0.5,
ai = c(0.3, 0.6, 0.1),
rescale = FALSE)
random_curdling <- nlmr::nlm_curds(curds = c(0.5, 0.3, 0.6),
random_curdling <- NLMR::nlm_curds(curds = c(0.5, 0.3, 0.6),
recursion_steps = c(32, 6, 2))
midpoint_displacememt <- nlmr::nlm_mpd(ncol = 100,
midpoint_displacememt <- NLMR::nlm_mpd(ncol = 100,
nrow = 100,
roughness = 0.61)
```
Expand All @@ -69,7 +69,7 @@ midpoint_displacememt <- nlmr::nlm_mpd(ncol = 100,

## Overview

`nlmr` supplies 14 NLM algorithms, with several options to simulate derivates of
`NLMR` supplies 14 NLM algorithms, with several options to simulate derivates of
them. The algorithms differ from each other in spatial auto-correlation, from
no auto-correlation (random NLM) to a constant gradient (planar gradients):

Expand Down Expand Up @@ -159,18 +159,18 @@ kable(function_tibble) %>%

## See also

`nlmr` was split during its development process - to have a minimal dependency version
`NLMR` was split during its development process - to have a minimal dependency version
for simulating neutral landscape models and an utility toolbox to facilate workflows
with raster data.
If you are interested in merging, visualizing or further handling neutral landscape models
have a look at the [landscapetools](https://github.com/ropensci/landscapetools/) package.

## Meta

* Please [report any issues or bugs](https://github.com/ropensci/nlmr/issues/new/).
* Please [report any issues or bugs](https://github.com/ropensci/NLMR/issues/new/).
* License: GPL3
* Get citation information for `nlmr` in R doing `citation(package = 'nlmr')`
* Additionally, we keep a [record of publications](https://ropensci.github.io/nlmr/articles/publication_record.html/) that use`nlmr`. Hence, if you used `nlmr` please [file an issue on GitHub](https://github.com/ropensci/nlmr/issues/new/) so we can add it to the list.
* Get citation information for `NLMR` in R doing `citation(package = 'NLMR')`
* Additionally, we keep a [record of publications](https://ropensci.github.io/NLMR/articles/publication_record.html/) that use`NLMR`. Hence, if you used `NLMR` please [file an issue on GitHub](https://github.com/ropensci/NLMR/issues/new/) so we can add it to the list.
* We are very open to contributions - if you are interested check out our [Contributor Guidelines](CONTRIBUTING.md).
* Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->
[![Build Status](https://travis-ci.org/ropensci/nlmr.svg?branch=develop)](https://travis-ci.org/ropensci/nlmr)[![Build status](https://ci.appveyor.com/api/projects/status/djw840fitcvolbxg?svg=true)](https://ci.appveyor.com/project/ropensci/nlmr) [![codecov](https://codecov.io/gh/ropensci/nlmr/branch/develop/graph/badge.svg?token=MKCm2fVrDa)](https://codecov.io/gh/ropensci/nlmr) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/NLMR)](https://cran.r-project.org/package=NLMR) [![Join the chat at https://gitter.im/nlmr\_landscapegenerator](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nlmr_landscapegenerator) [![](http://cranlogs.r-pkg.org/badges/grand-total/NLMR)](http://cran.rstudio.com/web/packages/NLMR/index.html) [![](https://badges.ropensci.org/188_status.svg)](https://github.com/ropensci/onboarding/issues/188)
[![Build Status](https://travis-ci.org/ropensci/NLMR.svg?branch=develop)](https://travis-ci.org/ropensci/NLMR)[![Build status](https://ci.appveyor.com/api/projects/status/djw840fitcvolbxg?svg=true)](https://ci.appveyor.com/project/ropensci/NLMR) [![codecov](https://codecov.io/gh/ropensci/NLMR/branch/develop/graph/badge.svg?token=MKCm2fVrDa)](https://codecov.io/gh/ropensci/NLMR) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/NLMR)](https://cran.r-project.org/package=NLMR) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![](http://cranlogs.r-pkg.org/badges/grand-total/NLMR)](http://cran.rstudio.com/web/packages/NLMR/index.html) [![](https://badges.ropensci.org/188_status.svg)](https://github.com/ropensci/onboarding/issues/188)

`nlmr` is an `R` package for simulating **n**eutral **l**andscape **m**odels (NLM). Designed to be a generic framework like [NLMpy](https://pypi.python.org/pypi/nlmpy), it leverages the ability to simulate the most common NLM that are described in the ecological literature. `nlmr` builds on the advantages of the `raster` package and returns all simulation as `RasterLayer` objects, thus ensuring a direct compability to common GIS tasks and a flexible and simple usage. Furthermore, it simulates NLMs within a self-contained, reproducible framework.
`NLMR` is an `R` package for simulating **n**eutral **l**andscape **m**odels (NLM). Designed to be a generic framework like [NLMpy](https://pypi.python.org/pypi/nlmpy), it leverages the ability to simulate the most common NLM that are described in the ecological literature. `NLMR` builds on the advantages of the `raster` package and returns all simulation as `RasterLayer` objects, thus ensuring a direct compability to common GIS tasks and a flexible and simple usage. Furthermore, it simulates NLMs within a self-contained, reproducible framework.

Installation
------------
Expand All @@ -15,30 +15,30 @@ install.packages("NLMR")

**NOTE**: The version on CRAN is pre-rOpenSci review, so it still contains the utility functions you find now in [`landscapetools`](https://github.com/ropensci/landscapetools).

To install the developmental version of `nlmr`, use the following R code:
To install the developmental version of `NLMR`, use the following R code:

``` r
# install.packages("devtools")
devtools::install_github("ropensci/nlmr", ref = "develop")
devtools::install_github("ropensci/NLMR", ref = "develop")
```

Example
-------

Each neutral landscape models is simulated with a single function (all starting with `nlm_`) in `nlmr`, e.g.:
Each neutral landscape models is simulated with a single function (all starting with `nlm_`) in `NLMR`, e.g.:

``` r
random_cluster <- nlmr::nlm_randomcluster(nrow = 100,
random_cluster <- NLMR::nlm_randomcluster(nrow = 100,
ncol = 100,
p = 0.5,
ai = c(0.3, 0.6, 0.1),
rescale = FALSE)

random_curdling <- nlmr::nlm_curds(curds = c(0.5, 0.3, 0.6),
random_curdling <- NLMR::nlm_curds(curds = c(0.5, 0.3, 0.6),
recursion_steps = c(32, 6, 2))


midpoint_displacememt <- nlmr::nlm_mpd(ncol = 100,
midpoint_displacememt <- NLMR::nlm_mpd(ncol = 100,
nrow = 100,
roughness = 0.61)
```
Expand All @@ -48,7 +48,7 @@ midpoint_displacememt <- nlmr::nlm_mpd(ncol = 100,
Overview
--------

`nlmr` supplies 14 NLM algorithms, with several options to simulate derivates of them. The algorithms differ from each other in spatial auto-correlation, from no auto-correlation (random NLM) to a constant gradient (planar gradients):
`NLMR` supplies 14 NLM algorithms, with several options to simulate derivates of them. The algorithms differ from each other in spatial auto-correlation, from no auto-correlation (random NLM) to a constant gradient (planar gradients):

| Function | Description | Reference |
|:------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------|
Expand All @@ -72,15 +72,15 @@ Overview
See also
--------

`nlmr` was split during its development process - to have a minimal dependency version for simulating neutral landscape models and an utility toolbox to facilate workflows with raster data. If you are interested in merging, visualizing or further handling neutral landscape models have a look at the [landscapetools](https://github.com/ropensci/landscapetools/) package.
`NLMR` was split during its development process - to have a minimal dependency version for simulating neutral landscape models and an utility toolbox to facilate workflows with raster data. If you are interested in merging, visualizing or further handling neutral landscape models have a look at the [landscapetools](https://github.com/ropensci/landscapetools/) package.

Meta
----

- Please [report any issues or bugs](https://github.com/ropensci/nlmr/issues/new/).
- Please [report any issues or bugs](https://github.com/ropensci/NLMR/issues/new/).
- License: GPL3
- Get citation information for `nlmr` in R doing `citation(package = 'nlmr')`
- Additionally, we keep a [record of publications](https://ropensci.github.io/nlmr/articles/publication_record.html/) that use`nlmr`. Hence, if you used `nlmr` please [file an issue on GitHub](https://github.com/ropensci/nlmr/issues/new/) so we can add it to the list.
- Get citation information for `NLMR` in R doing `citation(package = 'NLMR')`
- Additionally, we keep a [record of publications](https://ropensci.github.io/NLMR/articles/publication_record.html/) that use`NLMR`. Hence, if you used `NLMR` please [file an issue on GitHub](https://github.com/ropensci/NLMR/issues/new/) so we can add it to the list.
- We are very open to contributions - if you are interested check out our [Contributor Guidelines](CONTRIBUTING.md).
- Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

Expand Down
15 changes: 2 additions & 13 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
## New submission/Updated package
## Resubmission

nlmr replaces NLMR.

This update is the development of a review process through
rOpenSci. During that, we were encouraged to split the package into two distinct
packages and rename it - hence this package is now a slender version that
is focused only on simulating the data and not handling it.
The renaming was done to meet the requirements of rOpenSci and ensure a long-term
compliance to their software standards.

The package itself keeps its main functionality, so none of the users should
have major difficulties. Since there are no reverse depencies, the renaming of
the package should have only minor drawbacks in general.
Fixed invalid URL in documentation.

## Test environments

Expand Down
4 changes: 2 additions & 2 deletions docs/CONDUCT.html

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

4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.html

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

Loading

0 comments on commit bccd4b5

Please sign in to comment.