Skip to content

Commit

Permalink
Merge pull request #322 from r-spatialecology/main
Browse files Browse the repository at this point in the history
v2.1.2
  • Loading branch information
mhesselbarth authored May 2, 2024
2 parents 60b7ff3 + 7730002 commit 9662d00
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: landscapemetrics
Title: Landscape Metrics for Categorical Map Patterns
Version: 2.1.1
Version: 2.1.2
Authors@R: c(person("Maximilian H.K.", "Hesselbarth",
role = c("aut", "cre"),
email = "[email protected]",
Expand Down Expand Up @@ -76,5 +76,5 @@ Encoding: UTF-8
LazyData: true
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# landscapemetrics 2.1.2
* Bugfixes
* Bug in `spatialze_lsm()` with `directions` argument

# landscapemetrics 2.1.1
* Improvements
* Simplify roxygen2 docs
Expand Down
4 changes: 3 additions & 1 deletion R/lsm_p_gyrate.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ lsm_p_gyrate_calc <- function(landscape, directions, cell_center, resolution, ex

# get (relative) coordinates of current class
points <- which(!is.na(landscape_labeled), arr.ind = TRUE)
points <- mapply(FUN = `*`, as.data.frame(points), resolution)
dim_points <- dim(points)
points <- mapply(FUN = `*`, data.frame(points), resolution)
dim(points) <- dim_points

# set ID from class ID to unique patch ID
points <- cbind(points, landscape_labeled[!is.na(landscape_labeled)])
Expand Down
1 change: 1 addition & 0 deletions R/spatialize_lsm.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ spatialize_lsm_internal <- function(landscape, level, metric, name, type, what,
# get metric value
fill_value <- calculate_lsm(landscape,
what = metrics[[x]],
directions = directions,
progress = FALSE,
...)

Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codeRepository": "https://r-spatialecology.github.io/landscapemetrics/",
"issueTracker": "https://github.com/r-spatialecology/landscapemetrics/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "2.1.1",
"version": "2.1.2",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -303,7 +303,7 @@
},
"SystemRequirements": null
},
"fileSize": "1728.517KB",
"fileSize": "1720.026KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
3 changes: 3 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# landscapemetrics 2.1.2
Minor bugfixes

# landscapemetrics 2.1.1
Minor bugfix and improvements

Expand Down
2 changes: 1 addition & 1 deletion man/landscapemetrics.Rd

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

0 comments on commit 9662d00

Please sign in to comment.