at a cell center lead to inaccuracies. Secondly, sample plots can exceed the
landscape boundary. Therefore, we report the actual clipped sample plot area relative
in relation to the theoretical, maximum sample plot area e.g. a sample plot only half
-within the landscape will have a percentage_inside = 50
. Please be aware that the
+within the landscape will have a percentage_inside = 50
. Additionally, if the polygon
+representing the sample plot is smaller than the cell size of the raster,
+the percentage_inside
may exceed 100%.Please be aware that the
output is slightly different to all other lsm
-function of landscapemetrics
.
Please be aware that the function behaves differently for POLYGONS and MULTIPOLYGONS.
In the first case, each polygon is used as a singular sample area, while in the second
diff --git a/search.json b/search.json
index 4d5b53a2..a57a7128 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement mhk.hesselbarth@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"please-contribute","dir":"","previous_headings":"","what":"Please contribute!","title":"CONTRIBUTING","text":"love collaboration. fact, one main ideas start work package. includes suggestions even implementations new landscape metrics. course, also welcome suggest general improvements package structure whatsoever. appreciate contribution collaboration.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"Please contribute!","what":"Code of Conduct","title":"CONTRIBUTING","text":"Please note landscapemetrics project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"ask-a-question-interrobang","dir":"","previous_headings":"How to contribute","what":"Ask a question ⁉️","title":"CONTRIBUTING","text":"Browse documentation see can find solution. Still stuck? Open issue GitHub GitHub. ’ll try best address , questions often lead better documentation discovery bugs. want ask question private get contact mhk.hesselbarth<>gmail.com sciaini.marcogmail.com. Please try include reproducible example using example reprex package.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"propose-an-idea-bulb","dir":"","previous_headings":"How to contribute","what":"Propose an idea 💡","title":"CONTRIBUTING","text":"Take look documentation issue GitHub list see isn’t included suggested yet. , please open new issue! can’t promise implement idea, helps : Explain detail work. Keep scope narrow possible.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"report-a-bug-bug","dir":"","previous_headings":"How to contribute","what":"Report a bug 🐛","title":"CONTRIBUTING","text":"Report issue GitHub can fix . good bug report makes easier us , please include: content utils::sessionInfo(). details local setup might helpful troubleshooting. Detailed steps reproduce bug , please try include reproducible example using example reprex package.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"improve-the-documentation-book","dir":"","previous_headings":"How to contribute","what":"Improve the documentation 📖","title":"CONTRIBUTING","text":"Good documentation makes difference, help improve welcome! use roxygen2, Markdown syntax, documentation.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"pull-request-process-arrow_up_down","dir":"","previous_headings":"How to contribute","what":"Pull request process ↕️","title":"CONTRIBUTING","text":"try follow GitHub flow development. Fork repo clone computer. learn process, see guide. Don’t forget pull new changes starting work! Open RStudio project file (.Rproj) install development dependencies (e.g., using devtools::install_dev_deps()). Make sure package passes R CMD check running devtools::check(). Create new Git branch use name briefly describes proposed changes. Make changes: Write code. Test code (bonus points adding unit tests using testthat package). Document code (see function documentation ). Check code devtools::check() aim 0 errors, warnings notes. Commit push changes. Submit pull request. New code follow tidyverse style guide.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/CONTRIBUTING.html","id":"references","dir":"","previous_headings":"How to contribute > Pull request process ↕️","what":"References","title":"CONTRIBUTING","text":"CONTRIBUTING.md adapted .","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc. Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) 2018 Marco Sciaini This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . landscapemetrics Copyright (C) 2018 Marco Sciaini This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"comparison-with-fragstats","dir":"Articles","previous_headings":"","what":"Comparison with FRAGSTATS","title":"Differences to FRAGSTATS","text":"landscapemetrics re-implements landscape metrics mostly described FRAGSTATS software (McGarigal et al. 2023). Therefore, compare results results FRAGSTATS. patch-level use correlation approach testing values calculated landscapemetrics FRAGSTATS least correlation p>=0.975 able exactly match patches. class- landscape-level can match individual values test deviation larger 5%. process, recognized differences results. metrics FRAGSTATS interdependent across scales. Thus, deviation patch level, propagates class- landscape-level. document, list metrics deviations lowest level . Unfortunately, access source code FRAGSTATS. Therefore, able finally explain present differences results.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"general-differences","dir":"Articles","previous_headings":"Comparison with FRAGSTATS","what":"General differences","title":"Differences to FRAGSTATS","text":"Firstly, patch ID ordered different way, due technical reasons (connected patches specified). Therefore, one pay attention comparing results patch level FRAGSTATS landscapemetrics. double precision floating point numbers rounded FRAGSTATS. Contrastingly, round numbers. Naturally, can lead small deviations results. However, small differences influence interpretation results. quite metrics class- landscape-level summarize patch level metrics (e.g., mean, standard deviation (sd) coefficient variation (cv) values belonging class ). results identical single patches mean patches, slight differences lanscapemetrics FRAGSTATS sd cv. landscapemetrics uses base R functions standard statistical definitions summarize patch level metrics. , difference minor affect interpretation results. following, comparing cv sd patch area. including cv calculated patch areas actual output FRAGSTATS well output landscapemetrics. Interestingly, cv calculated patches FRAGSTATS identical cv landscapemetrics, already summarized result FRAGSTATS slightly different. cv, also minor differences sd. result calculated patch areas FRAGSTATS identical result landscapemetrics, summarized result FRAGSTATS.","code":"# function to calculate coefficient of variation cv <- function(x) { (sd(x) / mean(x)) * 100 }"},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"all-core-related-metrics","dir":"Articles","previous_headings":"Comparison with FRAGSTATS > Specific differences","what":"All core-related metrics","title":"Differences to FRAGSTATS","text":"Different definitions core area patch result differences metrics somehow related core area number disjunct core areas. landscapemetrics uses cell-centered definition core area, namely “cell defined core area cell neighbour different value (rook’s case).” Contrastingly, FRAGSTATS uses “[…] method involving use variably-sized masked placed cells perimeter patch […]”. Especially patches rather complicated shapes seem result different core-metric values.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"gyrate-metric","dir":"Articles","previous_headings":"Comparison with FRAGSTATS > Specific differences","what":"GYRATE metric","title":"Differences to FRAGSTATS","text":"According FRAGSTATS radius gyration patch consisting single cell equal GYRATE = 0. […] GYRATE = 0 patch consists single cell […] However, patches containing single cell FRAGSTATS returns value GYRATE = 0.5. following table, patches area area = 0.0001 consist one cell. Additionally, recognized small differences patches well. However, find explanation difference, yet.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"para-metric","dir":"Articles","previous_headings":"Comparison with FRAGSTATS > Specific differences","what":"PARA metric","title":"Differences to FRAGSTATS","text":"documentation FRAGSTATS defines perimeter-area ratio following: […] PARA equals ratio patch perimeter (m) area (m2). […] Contrastingly, output FRAGSTATS gives result ratio patch perimeter meters area hectares. implemented PARA documented FRAGSTATS manual using square meters. Nevertheless, differences softwares based different units, shown converting FRAGSTATS output meters per square meters.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"shape-metric","dir":"Articles","previous_headings":"Comparison with FRAGSTATS > Specific differences","what":"SHAPE metric","title":"Differences to FRAGSTATS","text":"following definition provided latest version FRAGSTATS manual, shape index defined perimeter (m) divided square root area (m2) patch ij, adjusted constant adjust square standard. Yet, patches minor differences landscapemetrics FRAGSTATS.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"circle-metric","dir":"Articles","previous_headings":"Comparison with FRAGSTATS > Specific differences","what":"CIRCLE metric","title":"Differences to FRAGSTATS","text":"According FRAGSTATS, patches one cell CIRCLE = 0. […] CIRCLE = 0 one cell patches. […] Nevertheless, also patches one cell dimension raster context, decided calculate CIRCLE metric patches. seems like FRAGSTATS uses largest distance corner points cells calculate diameter circumscribing circle. However, necessarily result correct circumscribing circle. approach works well compact patch shapes, cases approach fails. One example T-shaped patches. Contrastingly FRAGSTATS, algorithm calculates true circumscribing circle also patches.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"comparison-with-sdmtools","dir":"Articles","previous_headings":"","what":"Comparison with SDMTools","title":"Differences to FRAGSTATS","text":"SDMTools (VanDerWal et al. 2014) (still available, apparently longer maintained) offers landscape metrics patch class level. However, return results FRAGSTATS. main reason different standard defaults (e.g., SDMTools always considers global landscape boundary) SDMTools returns results map units m^2/hectar, FRAGSTATS/landscapemetrics. also explains differences package SDMTools. Jemma Stachelek nice remind us issues provided comparison.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"patch-metrics","dir":"Articles","previous_headings":"Comparison with SDMTools","what":"Patch metrics","title":"Differences to FRAGSTATS","text":"get available metrics , e.g., patch level SDMTools, make binary landscape every class landscape, perform connected components labelling calculate patch metrics. landscapemetrics offers tasks function get_patches() metrics done internally. get metrics patch level landscapemetrics example :","code":"# binarize every class in the landscape and calculate patch metrics sdmtools_result <- lapply(terra::unique(landscape), FUN = function(x){ tmp_land <- landscape terra::values(tmp_land)[terra::values(tmp_land) != x] <- NA terra::values(tmp_land)[terra::values(tmp_land) == x] <- 1 ccl <- SDMTools::ConnCompLabel(raster::raster(tmp_land)) PatchStat(ccl) }) # combine to one data frame sdmtools_result <- dplyr::bind_rows(sdmtools_result, .id = \"Class\") patch_metrics <- calculate_lsm(landscape, what = \"patch\")"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/comparing_tools.html","id":"references","dir":"Articles","previous_headings":"Comparison with SDMTools > Patch metrics","what":"References","title":"Differences to FRAGSTATS","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org Jeremy VanDerWal, Lorena Falconi, Stephanie Januchowski, Luke Shoo Collin Storlie (2014). SDMTools: Species Distribution Modelling Tools: Tools processing data associated species distribution modelling exercises. R package version 1.1-221. https://CRAN.R-project.org/package=SDMTools","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/general_background.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"General background","text":"Ecology landscape ecology mainly studies interactions organisms environment. wider sense, environment perceived organism can defined landscape. can spread huge areas , e.g., mobile, large-bodied mammals much smaller areas , e.g., immobile insects always depends research question. Landscape metrics tools characterize landscape. includes mainly describing composition configuration landscape. composition basically describes much landscape occupied certain land cover type, configuration mainly describes spatial arrangement land cover types. basic idea landscape metrics condense much information possible single number. landscapemetrics package supports terra spatial objects. raster (sometimes also referred grid) contains spatial information dividing landscape discrete cells. Consequently, cells smallest “resolution information”. landscapemetrics deals categorical data, cell assigned discrete class (see Fig. 1 details). classes must positive integer numbers. Fig 1.: ) b) landscape, continous () categorical (b) representation. continuous landscape typically expected remote sensing imagery interpolated enviromental data. Categorical landscapes mostly classified percieved humans, e.g. land cover use classes.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/general_background.html","id":"levels-of-landscape-metrics","dir":"Articles","previous_headings":"Introduction","what":"Levels of landscape metrics","title":"General background","text":"Landscape metrics can calculated three different levels (“scales”). level contains information different aspects landscape. Level interest depends largely research question, often combination several levels can useful. Similar, also decision metric use depends research question asked. patch defined neighboring cells belonging class . Hereby, landscapemetrics uses 8-neighbors rule (Queen’s case) identify patches. Patch level metrics calculated every patch landscape, regardless class patch belongs . output match number patches present landscape. metrics also often basis metrics two levels. Class level metrics summaries patches belonging one class . metrics can either “distribution” patch level metrics patches class (e.g., mean) consider patches class calculations metric. Regardless mathematical background, output always match number classes present. Class level metrics suitable describe composition configuration landscape. Landscape level metrics summaries whole landscape one value. can either done summarising metrics lower levels calculating metric including patches classes. Following, output always just one number. Landscape level metrics suitable condensing information landscape just one value.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/general_background.html","id":"classes-of-landscape-metrics","dir":"Articles","previous_headings":"Introduction","what":"Classes of landscape metrics","title":"General background","text":"six different classes landscape metrics implemented landscapemetrics: Area edge metrics describe size patches classes amount edge. edge defined border two patches class k meters. metrics mainly characterize composition landscape able show dominance rareness classes. Shape metrics describe shape patches, mainly using area perimeter. can important many research questions, , e.g., even though, equal size, long narrow patches probably different characteristics squared patch size. Core metrics describe area patches edge. metrics can interesting research questions , e.g., areas influenced neighboring patches different class interest. Aggregation metrics describe patches (class) rather clumped (aggregated) tend isolated. Following, metrics describe mainly spatial configuration landscape. Diversity metrics available landscape level. describe abundance dominance/rareness classes. Thereby, show diversity present classes. Complexity metrics information, please see New Metrics outside FRAGSTATS.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/general_background.html","id":"other-software-to-calculate-landscape-metrics","dir":"Articles","previous_headings":"Introduction","what":"Other software to calculate landscape metrics","title":"General background","text":"already software packages available calculate landscape metrics, famous one probably stand-alone software FRAGSTATS (McGarigal et al. 2023). also add-ons GIS software available, e.g. r.le (Baker & Cai 1992) successor r.li GRASS GIS. Lastly, also R package, namely SDMTools (VanDerWal et al. 2014), can used. Nevertheless, decided re-implement metrics available FRAGSTATS. wanted provide comprehensive collection landscape metrics R. FRAGSTATS extensive collection available Windows. Note, even though tried re-implement metrics described FRAGSTATS manual, differences (Differences FRAGSTATS|landscapemetrics). , SDMTools contains subset metrics cover levels (General background). Lastly, want start collection landscape metrics open source easily extendable new (future) landscape metrics (see CONTRIBUTING). Also, one major advantage landscapemetrics utility functions , e.g., visualization sampling landscape metrics. main reasons implemented landscapemetrics, however, want fully appreciate acknowledge already present software.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/general_background.html","id":"references","dir":"Articles","previous_headings":"Introduction > Other software to calculate landscape metrics","what":"References","title":"General background","text":"Baker, W.L. Cai, Y. 1992. r.le programs multiscale analysis landscape structure using GRASS geographical information system. Landscape Ecology 7(4):291-302. McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org VanDerWal, J., Falconi, L., Januchowski, S., Shoo, L., Storlie, C. 2014. SDMTools: Species Distribution Modelling Tools: Tools processing data associated species distribution modelling exercises. R package version 1.1-221. https://CRAN.R-project.org/package=SDMTools","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/get_started.html","id":"design","dir":"Articles","previous_headings":"","what":"Design","title":"Get started","text":"functions landscapemetrics start lsm_ (landscapemetrics). second part name specifies level (patch - p, class - c landscape - l). last part function name abbreviation corresponding metric (e.g., ennfor euclidean nearest-neighbor distance): lsm_ functions return identically structured tibble:","code":"# general structure lsm_\"level\"_\"metric\" # Patch level ## lsm_p_\"metric\" lsm_p_enn() # Class level ## lsm_c_\"metric\" lsm_c_enn() # Landscape level ## lsm_p_\"metric\" lsm_l_enn()"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/get_started.html","id":"checking-your-landscape","dir":"Articles","previous_headings":"","what":"Checking your landscape","title":"Get started","text":"using landscapemetrics calculating landscape metrics general, makes sense check landscape. landscape properties restrict calculation interpretation landscape metrics, detected check_landscape: requirements calculate meaningful landscape metrics : distance units projection meters, package converts units internally returns results either meters, square meters hectares. information see help file function. raster encodes landscape classes integers (1, 2, 3, 4, …, n). Landscape metrics describe categorical landscapes, means landscape needs classified (throw warning 30 classes make sure work classified landscape).","code":"# import raster # for local file: rast(\"pathtoyourraster/raster.asc\") # ... or any other raster file type, geotiff, ... # Check your landscape check_landscape(landscape) # because CRS is unknown, not clear #> Warning: Caution: Coordinate reference system not metric - Units of results #> based on cellsizes and/or distances may be incorrect. #> layer crs units class n_classes OK #> 1 1 NA NA integer 3 ❓ check_landscape(podlasie_ccilc) # wrong units #> Warning: Caution: Coordinate reference system not metric - Units of results #> based on cellsizes and/or distances may be incorrect. #> layer crs units class n_classes OK #> 1 1 geographic degrees integer 14 ✖ check_landscape(augusta_nlcd) # everything is ok #> layer crs units class n_classes OK #> 1 1 projected m integer 15 ✔"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/get_started.html","id":"using-landscapemetrics","dir":"Articles","previous_headings":"","what":"Using landscapemetrics","title":"Get started","text":"sure landscape suitable calculation landscape metrics, landscapemetrics makes quite easy:","code":"# import raster # for local file: rast(\"pathtoyourraster/raster.asc\") # ... or any other raster file type, geotiff, ... # Calculate e.g. perimeter of all patches lsm_p_perim(landscape) #> # A tibble: 28 × 6 #> layer level class id metric value #> #> 1 1 patch 1 1 perim 4 #> 2 1 patch 1 2 perim 12 #> 3 1 patch 1 3 perim 60 #> 4 1 patch 1 4 perim 4 #> 5 1 patch 1 5 perim 4 #> 6 1 patch 1 6 perim 68 #> 7 1 patch 1 7 perim 22 #> 8 1 patch 1 8 perim 10 #> 9 1 patch 1 9 perim 10 #> 10 1 patch 2 10 perim 38 #> # ℹ 18 more rows"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/get_started.html","id":"using-landscapemetrics-in-a-tidy-workflow","dir":"Articles","previous_headings":"Using landscapemetrics","what":"Using landscapemetrics in a tidy workflow","title":"Get started","text":"Every function landscapemetrics accept data first argument, makes piping natural workflow. possible use case load spatial data, calculate landscape metrics use resulting tibble analyses.","code":"# all patch IDs of class 2 with an ENN > 2.5 subsample_patches <- landscape |> lsm_p_enn() |> dplyr::filter(class == 2 & value > 2.5) |> dplyr::pull(id) # show results subsample_patches #> [1] 10 11 12 13 14 15 16 17 18 19 20 21 22"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/get_started.html","id":"use-multiple-metric-functions","dir":"Articles","previous_headings":"Using landscapemetrics","what":"Use multiple metric functions","title":"Get started","text":"list available metrics, just use list_lsm() function. , can specify, example, level type metrics. Every function returns tibble, thus combining metrics selected research question straightforward: metrics abbreviated result tibble. Therefore, provide tibble containing full metric names, well class metric (lsm_abbreviations_names). Using e.g. left_join() function dplyr package one join result tibble abbreviations tibble. Additionally, provide wrapper desired metrics can specified vector strings. metrics regardless level return identical tibble, different levels can mixed. also possible calculate available metrics certain level using, e.g., level = \"patch\". Additionally, similar list_lsm() can also specify, e.g., certain group metrics. course, can also include full names information metrics using full_name = TRUE.","code":"# list all available metrics list_lsm() #> # A tibble: 133 × 5 #> metric name type level function_name #> #> 1 area patch area area and edge… patch lsm_p_area #> 2 cai core area index core area met… patch lsm_p_cai #> 3 circle related circumscribing circle shape metric patch lsm_p_circle #> 4 contig contiguity index shape metric patch lsm_p_contig #> 5 core core area core area met… patch lsm_p_core #> 6 enn euclidean nearest neighbor distance aggregation m… patch lsm_p_enn #> 7 frac fractal dimension index shape metric patch lsm_p_frac #> 8 gyrate radius of gyration area and edge… patch lsm_p_gyrate #> 9 ncore number of core areas core area met… patch lsm_p_ncore #> 10 para perimeter-area ratio shape metric patch lsm_p_para #> # ℹ 123 more rows # list only aggregation metrics at landscape level and just return function name list_lsm(level = \"landscape\", type = \"aggregation metric\", simplify = TRUE) #> [1] \"lsm_l_ai\" \"lsm_l_cohesion\" \"lsm_l_contag\" \"lsm_l_division\" #> [5] \"lsm_l_enn_cv\" \"lsm_l_enn_mn\" \"lsm_l_enn_sd\" \"lsm_l_iji\" #> [9] \"lsm_l_lsi\" \"lsm_l_mesh\" \"lsm_l_np\" \"lsm_l_pd\" #> [13] \"lsm_l_pladj\" \"lsm_l_split\" # you can also combine arguments and only return the function names list_lsm(level = c(\"patch\", \"landscape\"), type = \"core area metric\", simplify = TRUE) #> [1] \"lsm_p_cai\" \"lsm_p_core\" \"lsm_p_ncore\" \"lsm_l_cai_cv\" #> [5] \"lsm_l_cai_mn\" \"lsm_l_cai_sd\" \"lsm_l_core_cv\" \"lsm_l_core_mn\" #> [9] \"lsm_l_core_sd\" \"lsm_l_dcad\" \"lsm_l_dcore_cv\" \"lsm_l_dcore_mn\" #> [13] \"lsm_l_dcore_sd\" \"lsm_l_ndca\" \"lsm_l_tca\" # bind results from different metric functions patch_metrics <- dplyr::bind_rows( lsm_p_cai(landscape), lsm_p_circle(landscape), lsm_p_enn(landscape) ) # look at the results patch_metrics #> # A tibble: 84 × 6 #> layer level class id metric value #> #> 1 1 patch 1 1 cai 0 #> 2 1 patch 1 2 cai 0 #> 3 1 patch 1 3 cai 48.6 #> 4 1 patch 1 4 cai 0 #> 5 1 patch 1 5 cai 0 #> 6 1 patch 1 6 cai 47.5 #> 7 1 patch 1 7 cai 18.7 #> 8 1 patch 1 8 cai 0 #> 9 1 patch 1 9 cai 0 #> 10 1 patch 2 10 cai 26.5 #> # ℹ 74 more rows # bind results from different metric functions patch_metrics <- dplyr::bind_rows( lsm_p_cai(landscape), lsm_p_circle(landscape), lsm_p_enn(landscape) ) # look at the results patch_metrics_full_names <- dplyr::left_join(x = patch_metrics, y = lsm_abbreviations_names, by = \"metric\") patch_metrics_full_names #> # A tibble: 84 × 10 #> layer level.x class id metric value name type level.y function_name #> #> 1 1 patch 1 1 cai 0 core area… core… patch lsm_p_cai #> 2 1 patch 1 2 cai 0 core area… core… patch lsm_p_cai #> 3 1 patch 1 3 cai 48.6 core area… core… patch lsm_p_cai #> 4 1 patch 1 4 cai 0 core area… core… patch lsm_p_cai #> 5 1 patch 1 5 cai 0 core area… core… patch lsm_p_cai #> 6 1 patch 1 6 cai 47.5 core area… core… patch lsm_p_cai #> 7 1 patch 1 7 cai 18.7 core area… core… patch lsm_p_cai #> 8 1 patch 1 8 cai 0 core area… core… patch lsm_p_cai #> 9 1 patch 1 9 cai 0 core area… core… patch lsm_p_cai #> 10 1 patch 2 10 cai 26.5 core area… core… patch lsm_p_cai #> # ℹ 74 more rows # calculate certain metrics calculate_lsm(landscape, what = c(\"lsm_c_pland\", \"lsm_l_ta\", \"lsm_l_te\")) #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> # A tibble: 5 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA pland 20.4 #> 2 1 class 2 NA pland 26 #> 3 1 class 3 NA pland 53.6 #> 4 1 landscape NA NA ta 0.09 #> 5 1 landscape NA NA te 340 # calculate all aggregation metrics on patch and landscape level calculate_lsm(landscape, type = \"aggregation metric\", level = c(\"patch\", \"landscape\")) #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> # A tibble: 42 × 6 #> layer level class id metric value #> #> 1 1 landscape NA NA ai 82.5 #> 2 1 landscape NA NA cohesion 90.6 #> 3 1 landscape NA NA contag 26.3 #> 4 1 landscape NA NA division 0.896 #> 5 1 landscape NA NA enn_cv 42.8 #> 6 1 landscape NA NA enn_mn 3.42 #> 7 1 landscape NA NA enn_sd 1.46 #> 8 1 landscape NA NA iji 89.8 #> 9 1 landscape NA NA lsi 3.83 #> 10 1 landscape NA NA mesh 0.00938 #> # ℹ 32 more rows # show full information of all metrics calculate_lsm(landscape, what = c(\"lsm_c_pland\", \"lsm_l_ta\", \"lsm_l_te\"), full_name = TRUE) #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> # A tibble: 5 × 9 #> layer level class id metric value name type function_name #> #> 1 1 class 1 NA pland 20.4 percentage of l… area… lsm_c_pland #> 2 1 class 2 NA pland 26 percentage of l… area… lsm_c_pland #> 3 1 class 3 NA pland 53.6 percentage of l… area… lsm_c_pland #> 4 1 landscape NA NA ta 0.09 total area area… lsm_l_ta #> 5 1 landscape NA NA te 340 total edge area… lsm_l_te"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/guide_moving_window.html","id":"implementation-in-landscapemetrics","dir":"Articles","previous_headings":"","what":"Implementation in landscapemetrics","title":"Moving window","text":"provide function window_lsm() landscapemetrics analyse input raster using moving window approach. function allows specify neighborhood using matrix using terra::focal() function internally. Currently, landscape level metrics possible calculate can specified similarly calculate_lsm(). details, see ?list_lsm(). First, need specify local neighborhood matrix. matrix must sides defined odd numbers, focal cell always center cell (details, see ?terra::focal()). Now, can easily pass matrix window_lsm() together input landscape. example, want calculate number classes (lsm_l_pr) joint entropy (lsm_l_joinent) local neighborhoods. type-stable, result nested list. first level includes layers SpatRaster (one SpatRaster provided), second level contains selected metrics. resulting SpatRaster describe local neighborhood according moving window around focal cell. case lsm_l_pr number classes present. future, also plan allow class level metrics, however, patch metrics meaningful (McGarigal 2012) added future.","code":"library(landscapemetrics) library(terra) library(ggplot2) # internal data needs to be read landscape <- terra::rast(landscapemetrics::landscape) moving_window <- matrix(1, nrow = 3, ncol = 3) moving_window ## [,1] [,2] [,3] ## [1,] 1 1 1 ## [2,] 1 1 1 ## [3,] 1 1 1 result <- window_lsm(landscape, window = moving_window, what = c(\"lsm_l_pr\", \"lsm_l_joinent\")) result ## $layer_1 ## $layer_1$lsm_l_joinent ## class : SpatRaster ## dimensions : 30, 30, 1 (nrow, ncol, nlyr) ## resolution : 1, 1 (x, y) ## extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) ## coord. ref. : ## source(s) : memory ## name : clumps ## min value : 0.000000 ## max value : 3.093069 ## ## $layer_1$lsm_l_pr ## class : SpatRaster ## dimensions : 30, 30, 1 (nrow, ncol, nlyr) ## resolution : 1, 1 (x, y) ## extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) ## coord. ref. : ## source(s) : memory ## name : clumps ## min value : 1 ## max value : 3"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/guide_moving_window.html","id":"references","dir":"Articles","previous_headings":"Implementation in landscapemetrics","what":"References","title":"Moving window","text":"Fletcher, R., Fortin, M.-J. 2018. Spatial Ecology Conservation Modeling: Applications R. Springer International Publishing. 523 pages Hagen-Zanker, . 2016. computational framework generalized moving windows application landscape pattern analysis. International journal applied earth observation geoinformation, 44, 205-216. McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org Šímová, P., & Gdulová, K. 2012. Landscape indices behavior: review scale effects. Applied Geography, 34, 385–394.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/guide_sample_lsm.html","id":"extract-landscape-metrics-at-sample-points","dir":"Articles","previous_headings":"","what":"Extract landscape metrics at sample points","title":"Sampling around points of interest","text":"extract_lsm() returns metrics patches sample point located. However, since makes sense individual patches, ’s possible extract patch-level metrics. Now, ’s straightforward extract e.g. patch area patches sample point located. Similar functions calculating several landscape metrics, selected metrics can specified various arguments (see list_lsm() details). resulting tibble includes one extra column (compared calculate_lsm()), indicating ID sample points. three sample points provided patch area requested, resulting tibble also three rows - one sample point. first second sample point actually located patch following also area identical. third sample point located much smaller patch. tibble gives also information patch ids land-cover classes sample points located.","code":"extract_lsm(landscape, y = points, what = \"lsm_p_area\") ## Warning: Please use 'check_landscape()' to ensure the input data is valid. ## # A tibble: 3 × 7 ## layer level class id metric value extract_id ## ## 1 1 patch 3 24 area 0.0113 1 ## 2 1 patch 3 26 area 0.0148 2 ## 3 1 patch 3 23 area 0.0159 3"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/guide_sample_lsm.html","id":"sample-landscape-metrics-at-sample-points","dir":"Articles","previous_headings":"","what":"Sample landscape metrics at sample points","title":"Sampling around points of interest","text":"sample landscape metrics within certain buffer around sample points, sample_lsm(). Now, size buffers around sample locations must specified. functions clips landscape within buffer (words sample plots) calculates selected metrics. resulting tibble includes two extra columns. , id sample point included. Furthermore, size actual sampled landscape can different provided size due two reasons. Firstly, clipping raster cells using circle sample plot directly cell center lead inaccuracies. Secondly, sample plots can exceed landscape boundary. Therefore, report actual clipped sample plot area relative relation theoretical, maximum sample plot area e.g. sample plot half within landscape percentage_inside = 50.","code":"sample_lsm(landscape, y = points, size = 10, level = \"landscape\", type = \"diversity metric\", classes_max = 3, verbose = FALSE) ## # A tibble: 27 × 8 ## layer level class id metric value plot_id percentage_inside ## ## 1 1 landscape NA NA msidi 0.947 1 75 ## 2 1 landscape NA NA msiei 0.862 1 75 ## 3 1 landscape NA NA pr 3 1 75 ## 4 1 landscape NA NA prd 10000 1 75 ## 5 1 landscape NA NA rpr 100 1 75 ## 6 1 landscape NA NA shdi 1.02 1 75 ## 7 1 landscape NA NA shei 0.928 1 75 ## 8 1 landscape NA NA sidi 0.612 1 75 ## 9 1 landscape NA NA siei 0.918 1 75 ## 10 1 landscape NA NA msidi 0.969 2 75 ## # ℹ 17 more rows"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/guide_sample_lsm.html","id":"references","dir":"Articles","previous_headings":"Sample landscape metrics at sample points","what":"References","title":"Sampling around points of interest","text":"Pebesma, E., 2018. Simple Features R: Standardized Support Spatial Vector Data. R Journal, https://journal.r-project.org/archive/2018/RJ-2018-009/ Roger S. Bivand, Edzer Pebesma, Virgilio Gomez-Rubio, 2013. Applied spatial data analysis R, Second edition. Springer, NY. http://www.asdar-book.org/","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/landscape_distribution_statistics.html","id":"implemented-distribution-statistics","dir":"Articles","previous_headings":"","what":"Implemented distribution statistics","title":"Landscape distribution statistics","text":"already implemented distribution statistics class- landscape-level indicated corresponding suffixes (_mn = mean, _cv = Coefficient variation , _sd = Standard deviation) can calculated directly.","code":"# calculate mean shape index on class level mean_shape_c <- lsm_c_shape_mn(landscape) # calculate standard deviation of shape index on landscape level sd_shape_l <- lsm_l_shape_sd(landscape)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/landscape_distribution_statistics.html","id":"area-weighted-mean","dir":"Articles","previous_headings":"","what":"Area-weighted mean","title":"Landscape distribution statistics","text":"First, want calculate metric interest patch level. Additionally, want patch area patch. Now, join metric value area patch, multiply two values, calculate area-weighted mean. calculate area-weighted mean landscape-level, comment dplyr::group_by() line.","code":"# calculate required metric for each patch (e.g. lsm_p_shape) metric_patch <- lsm_p_shape(landscape) metric_patch ## # A tibble: 28 × 6 ## layer level class id metric value ## ## 1 1 patch 1 1 shape 1 ## 2 1 patch 1 2 shape 1.34 ## 3 1 patch 1 3 shape 1.77 ## 4 1 patch 1 4 shape 1 ## 5 1 patch 1 5 shape 1 ## 6 1 patch 1 6 shape 1.90 ## 7 1 patch 1 7 shape 1.38 ## 8 1 patch 1 8 shape 1.44 ## 9 1 patch 1 9 shape 1.12 ## 10 1 patch 2 10 shape 1.63 ## # ℹ 18 more rows # calculate area for each patch area_patch <- lsm_p_area(landscape) area_patch ## # A tibble: 28 × 6 ## layer level class id metric value ## ## 1 1 patch 1 1 area 0.0001 ## 2 1 patch 1 2 area 0.0005 ## 3 1 patch 1 3 area 0.0072 ## 4 1 patch 1 4 area 0.0001 ## 5 1 patch 1 5 area 0.0001 ## 6 1 patch 1 6 area 0.008 ## 7 1 patch 1 7 area 0.0016 ## 8 1 patch 1 8 area 0.0003 ## 9 1 patch 1 9 area 0.0005 ## 10 1 patch 2 10 area 0.0034 ## # ℹ 18 more rows # calculate weighted mean metric_wght_mean <- dplyr::left_join(x = metric_patch, y = area_patch, by = c(\"layer\", \"level\", \"class\", \"id\")) |> dplyr::mutate(value.w = value.x * value.y) |> dplyr::group_by(class) |> dplyr::summarise(value.am = sum(value.w) / sum(value.y)) metric_wght_mean ## # A tibble: 3 × 2 ## class value.am ## ## 1 1 1.74 ## 2 2 1.46 ## 3 3 1.97"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/landscape_distribution_statistics.html","id":"range","dir":"Articles","previous_headings":"","what":"Range","title":"Landscape distribution statistics","text":"range equals minimum value subtracted maximum value metric interest patch (McGarigal et al. 2012). can calculated using min()/max() function range() function.","code":"# class level metric_range_c <- dplyr::group_by(metric_patch, class) |> dplyr::summarise(range = max(value) - min(value)) metric_range_c ## # A tibble: 3 × 2 ## class range ## ## 1 1 0.901 ## 2 2 0.633 ## 3 3 1.02 # landscape level metric_range_l <- diff(range(metric_patch$value)) metric_range_l ## [1] 1.351802"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/landscape_distribution_statistics.html","id":"median","dir":"Articles","previous_headings":"","what":"Median","title":"Landscape distribution statistics","text":"median equals value divides (ordered) values two equal groups. base R function available, median(), can applied values grouped class values (landscape-level).","code":"# class level metric_md_c <- dplyr::group_by(metric_patch, class) |> dplyr::summarise(median = median(value)) metric_md_c ## # A tibble: 3 × 2 ## class median ## ## 1 1 1.34 ## 2 2 1.06 ## 3 3 1.65 # landscape level metric_md_l <- median(metric_patch$value) metric_md_l ## [1] 1.337487"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/landscape_distribution_statistics.html","id":"references","dir":"Articles","previous_headings":"Median","what":"References","title":"Landscape distribution statistics","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/new_metrics.html","id":"information-theory-based-framework-for-the-analysis-of-landscape-patterns","dir":"Articles","previous_headings":"","what":"Information theory-based framework for the analysis of landscape patterns","title":"New metrics outside FRAGSTATS","text":"Nowosad J., TF Stepinski. 2019. Information theory consistent framework quantification classification landscape patterns. https://doi.org/10.1007/s10980-019-00830-x Information-theoretical framework can applied derive four metrics landscape complexity: Marginal entropy [H(x)], Conditional entropy [H(y|x)], Joint entropy [H(x, y)], Mutual information [(y,x)]. metrics implemented landscapemetrics: lsm_l_ent - Marginal entropy [H(x)]. represents diversity (thematic complexity, composition) spatial categories. calculated entropy marginal distribution. lsm_l_condent - Conditional entropy [H(y|x)]. represents configurational complexity (geometric intricacy) spatial pattern. value conditional entropy small, cells one category predominantly adjacent one category cells. hand, high value conditional entropy shows cells one category adjacent cells many different categories. lsm_l_joinent - Joint entropy [H(x, y)]. overall spatio-thematic complexity metric. represents uncertainty determining category focus cell category adjacent cell. words, measures diversity values co-occurrence matrix – smaller diversity, larger value joint entropy. lsm_l_mutinf - Mutual information [(y,x)]. quantifies information one random variable (x) provides another random variable (y). tells much easier predict category adjacent cell category focus cell known. Mutual information disambiguates landscape pattern types characterized value overall complexity. lsm_l_relmutinf - Relative mutual information. Due spatial autocorrelation, value mutual information tends grow diversity landscape (marginal entropy). adjust tendency, possible calculate relative mutual information dividing mutual information marginal entropy. Relative mutual information always range 0 1 can used compare spatial data different number distribution categories. information read Information theory provides consistent framework analysis spatial patterns blog post.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/publication_record.html","id":"a-list-of-publications","dir":"Articles","previous_headings":"","what":"A list of publications","title":"Publication record","text":"see papers already used landscapemetrics, please click .","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"visualizing-landscapes","dir":"Articles","previous_headings":"Visualisization functions","what":"Visualizing landscapes","title":"Utility functions","text":"can use plot function terra look landscape. typically inspect landscape, also makes quite hard relate landscape metrics interested . show following dissect landscape visually components, drive calculation landscape metrics.","code":"# Plot landscape plot(landscape)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"visualizing-patches","dir":"Articles","previous_headings":"Visualisization functions","what":"Visualizing patches","title":"Utility functions","text":"visualize patches landscape encode patch ID can used compare landscape metric actual landscape can use auxiliary visualisation function show_patches(): can also plot patches class grouped. show core area, visualization function show_cores. arguments similar show_patches(): Lastly, can also “fill” colours patch according value certain patch level metric, e.g., patch area, using show_lsm(). can chose label patch id actual value landscape metric (label_lsm = TRUE/FALSE). get result SpatRaster, spatialize_lsm().","code":"# Plot landscape + landscape with labeled patches show_patches(landscape) #> $layer_1 # show patches of all classes show_patches(landscape, class = \"all\", labels = FALSE) #> $layer_1 # show core area of class 1 and 3 show_cores(landscape, class = c(1, 2), labels = FALSE) #> $layer_1 # fill patch according to area show_lsm(landscape, what = \"lsm_p_area\", class = \"global\", label_lsm = TRUE) #> $layer_1 spatialize_lsm(landscape, what = \"lsm_p_area\") #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> $layer_1 #> $layer_1$lsm_p_area #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : value #> min value : 0.0001 #> max value : 0.0159"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"show-correlation","dir":"Articles","previous_headings":"","what":"Show correlation","title":"Utility functions","text":"Selecting meaningful landscape metrics field research difficult, many landscape metrics abstract common approach often simply calculate many possible. select least ones landscape research question highly correlated, can use function show_correlation() get first insight correlation metrics calculated:","code":"metrics <- calculate_lsm(landscape, what = \"patch\") #> Warning: Please use 'check_landscape()' to ensure the input data is valid. show_correlation(metrics, method = \"pearson\")"},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"get-patches","dir":"Articles","previous_headings":"Building blocks","what":"Get patches","title":"Utility functions","text":"landscapemetrics makes internally heavy use connected labeling algorithm exports re-implementation algorithm (get_patches()). function return list, list entry includes patches corresponding class. patches labeled 1…n. ","code":"# get a list of all patches for each class get_patches(landscape) #> $layer_1 #> $layer_1$class_1 #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : lyr.1 #> min value : 1 #> max value : 9 #> #> $layer_1$class_2 #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : lyr.1 #> min value : 10 #> max value : 22 #> #> $layer_1$class_3 #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : lyr.1 #> min value : 23 #> max value : 28"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"get-adjacencies","dir":"Articles","previous_headings":"Building blocks","what":"Get adjacencies","title":"Utility functions","text":"Adjacencies central part landscape metrics, calculating quick flexible way key , e.g., developing new metrics. Hence, landscapemetrics exports function can calculate adjacencies number directions provided binary matrix (NA / 1 - NA cells left looking adjacencies).","code":"# calculate full adjacency matrix get_adjacencies(landscape, neighbourhood = 4) #> $layer_1 #> 1 2 3 #> 1 542 44 137 #> 2 44 696 159 #> 3 137 159 1562 # count diagonal neighbour adjacencies diagonal_matrix <- matrix(c(1, NA, 1, NA, 0, NA, 1, NA, 1), 3, 3, byrow = TRUE) get_adjacencies(landscape, diagonal_matrix) #> $layer_1 #> 1 2 3 #> 1 486 56 169 #> 2 56 592 215 #> 3 169 215 1406 # equivalent with the terra package: adj_terra <- function(x){ adjacencies <- terra::adjacent(x, 1:terra::ncell(x), \"rook\", pairs=TRUE) table(terra::values(x, mat = FALSE)[adjacencies[,1]], terra::values(x, mat = FALSE)[adjacencies[,2]]) } # compare the two implementations bench::mark( get_adjacencies(landscape, neighbourhood = 4), adj_terra(landscape), iterations = 250, check = FALSE ) #> # A tibble: 2 × 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> #> 1 get_adjacencies(landscape, neighbo… 2.54ms 2.62ms 370. 22.6KB 13.8 #> 2 adj_terra(landscape) 4.64ms 4.71ms 205. 874.1KB 5.04 adj_terra(landscape) == get_adjacencies(landscape, 4)[[1]] #> #> 1 2 3 #> 1 TRUE TRUE TRUE #> 2 TRUE TRUE TRUE #> 3 TRUE TRUE TRUE"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"get-nearest-neighbour","dir":"Articles","previous_headings":"Building blocks","what":"Get nearest neighbour","title":"Utility functions","text":"landscapemetrics implements memory efficient quite fast way calculate nearest neighbour classes raster (matrix).","code":"# run connected labeling for raster patches <- get_patches(landscape, class = 1) # calculate the minimum distance between patches in a landscape min_dist <- get_nearestneighbour(patches$layer_1$class_1) # create a function that would do the same with the raster package nn_terra <- function(patches) { np_class <- terra::values(patches[[1]][[1]]) |> na.omit() |> unique() |> length() points_class <- terra::as.data.frame(patches[[1]][[1]], xy = TRUE) minimum_distance <- seq_len(np_class) |> purrr::map_dbl(function(patch_ij) { patch_focal <- dplyr::filter(points_class, lyr.1 == patch_ij) |> dplyr::select(x, y) |> as.matrix(ncol = 2) patch_others <- dplyr::filter(points_class, lyr.1 != patch_ij) |> dplyr::select(x, y) |> as.matrix(ncol = 2) minimum_distance <- terra::distance(patch_focal, patch_others, lonlat = FALSE) |> min() }) data.frame(id = unique(sort(points_class$lyr.1)), distance = minimum_distance) } # compare the two implementations bench::mark( get_nearestneighbour(patches$layer_1$class_1)[, 2:3], nn_terra(patches$layer_1$class_1), iterations = 250, check = FALSE ) #> # A tibble: 2 × 6 #> expression min median `itr/sec` mem_alloc `gc/sec` #> #> 1 get_nearestneighbour(patches$lay… 5.15ms 5.29ms 176. 283.89KB 13.6 #> 2 nn_terra(patches$layer_1$class_1) 44.94ms 46.37ms 21.3 2.83MB 6.43 # check if results are identical get_nearestneighbour(patches$layer_1$class_1)[, 2:3] == nn_terra(patches$layer_1$class_1) #> id dist #> [1,] TRUE TRUE #> [2,] TRUE TRUE #> [3,] TRUE TRUE #> [4,] TRUE TRUE #> [5,] TRUE TRUE #> [6,] TRUE TRUE #> [7,] TRUE TRUE #> [8,] TRUE TRUE #> [9,] TRUE TRUE"},{"path":"https://r-spatialecology.github.io/landscapemetrics/articles/utility.html","id":"get-circumscribing-circle","dir":"Articles","previous_headings":"Building blocks","what":"Get circumscribing circle","title":"Utility functions","text":"get smallest circumscribing circle includes cells patch, simply run get_circumscribingcircle(). result returns diameter circle includes cells patch. includes cell centers whole cells using cells corners.","code":"# get all patches of class 1 class_1 <- get_patches(landscape, class = 1) # get smallest circumscribing circle for each patch circle <- get_circumscribingcircle(class_1$layer_1$class_1) circle #> # A tibble: 9 × 7 #> layer level class id value center_x center_y #> #> 1 1 patch 1 1 1.41 0.5 29.5 #> 2 1 patch 2 2 4.12 0.5 21 #> 3 1 patch 3 3 15.5 7.38 13.7 #> 4 1 patch 4 4 1.41 5.5 0.5 #> 5 1 patch 5 5 1.41 11.5 3.5 #> 6 1 patch 6 6 16.6 19.5 22.5 #> 7 1 patch 7 7 6.71 17 8.5 #> 8 1 patch 8 8 3.61 20.5 1 #> 9 1 patch 9 9 3.61 26 2.5"},{"path":"https://r-spatialecology.github.io/landscapemetrics/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Maximilian H.K. Hesselbarth. Author, maintainer. Marco Sciaini. Author. Jakub Nowosad. Author. Sebastian Hanss. Author. Laura J. Graham. Contributor. Input package structure Jeffrey Hollister. Contributor. Input package structure Kimberly . . Contributor. Input package structure Florian Privé. Contributor. Original author underlying C++ code get_nearestneighbour() function Project Nayuki. Contributor. Original author underlying C++ code get_circumscribingcircle lsm_p_circle Matt Strimas-Mackey. Contributor. Bugfix sample_metrics()","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hesselbarth, M.H.K., Sciaini, M., , K.., Wiegand, K., Nowosad, J. 2019. landscapemetrics: open-source R tool calculate landscape metrics. - Ecography 42:1648-1657 (v0.0).","code":"@Article{, title = {landscapemetrics: an open-source R tool to calculate landscape metrics}, author = {Maximilian H.K. Hesselbarth and Marco Sciaini and Kimberly A. With and Kerstin Wiegand and Jakub Nowosad}, journal = {Ecography}, volume = {42}, year = {2019}, pages = {1648-1657}, }"},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"landscapemetrics-","dir":"","previous_headings":"","what":"Landscape Metrics for Categorical Map Patterns","title":"Landscape Metrics for Categorical Map Patterns","text":"README last updated: 2023-10-04 Starting v2.0.0, landscapemetrics uses terra sf internally. information terra package can found : https://rspatial.org/index.html.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Landscape Metrics for Categorical Map Patterns","text":"landscapemetrics R package calculating landscape metrics categorical landscape patterns tidy workflow. package can used drop-replacement FRAGSTATS (McGarigal et al. 2023), offers reproducible workflow landscape analysis single environment. also allows calculations four theoretical metrics landscape complexity: marginal entropy, conditional entropy, joint entropy, mutual information (Nowosad Stepinski 2019). landscapemetrics supports terra, stars takes SpatRaster stars spatial objects input arguments. Every function can used piped workflow, always takes data first argument returns tibble.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"citation","dir":"","previous_headings":"Overview","what":"Citation","title":"Landscape Metrics for Categorical Map Patterns","text":"cite landscapemetrics acknowledge use, please cite following Software note, substituting version application used ‘v0.0’: Hesselbarth, M.H.K., Sciaini, M., , K.., Wiegand, K., Nowosad, J. 2019. landscapemetrics: open‐source R tool calculate landscape metrics. Ecography, 42: 1648-1657 (v0.0). information see Publication record vignette. get BibTex entry, please use citation(\"landscapemetrics\").","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Landscape Metrics for Categorical Map Patterns","text":"several ways install landscapemetrics:","code":"# Get the stable version from CRAN install.packages(\"landscapemetrics\") # Alternatively, you can install the development version from Github # install.packages(\"remotes\") remotes::install_github(\"r-spatialecology/landscapemetrics\")"},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"announcement","dir":"","previous_headings":"Installation","what":"Announcement","title":"Landscape Metrics for Categorical Map Patterns","text":"Due improved connected-component labelling algorithm (landscapemetrics v1.4 higher), patches labeled different order therefore different patch IDs might used compared previous versions. However, results metrics identical.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"using-landscapemetrics","dir":"","previous_headings":"","what":"Using landscapemetrics","title":"Landscape Metrics for Categorical Map Patterns","text":"resolution raster cell meters, package converts units internally returns results either meters, square meters hectares. using landscapemetrics, sure check raster (see check_landscape()). functions landscapemetrics start lsm_ (landscape metrics). second part name specifies level (patch - p, class - c landscape - l). last part function name abbreviation corresponding metric (e.g. enn euclidean nearest-neighbor distance): functions return identical structured tibble:","code":"# general structure lsm_\"level\"_\"metric\" # Patch level ## lsm_p_\"metric\" lsm_p_enn() # Class level ## lsm_c_\"metric\" lsm_c_enn() # Landscape level ## lsm_p_\"metric\" lsm_l_enn()"},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"using-metric-functions","dir":"","previous_headings":"Using landscapemetrics","what":"Using metric functions","title":"Landscape Metrics for Categorical Map Patterns","text":"Every function follows implementation design, usage quite straightforward: also wrapper around every metric package quickly calculate bunch metrics:","code":"library(landscapemetrics) library(terra) # internal data needs to be read landscape <- terra::rast(landscapemetrics::landscape) # landscape raster plot(landscape) # calculate for example the Euclidean nearest-neighbor distance on patch level lsm_p_enn(landscape) #> # A tibble: 28 × 6 #> layer level class id metric value #> #> 1 1 patch 1 1 enn 7 #> 2 1 patch 1 2 enn 4 #> 3 1 patch 1 3 enn 2 #> 4 1 patch 1 4 enn 6.32 #> 5 1 patch 1 5 enn 5 #> 6 1 patch 1 6 enn 2.24 #> 7 1 patch 1 7 enn 2 #> 8 1 patch 1 8 enn 4.12 #> 9 1 patch 1 9 enn 4.12 #> 10 1 patch 2 10 enn 4.47 #> # ℹ 18 more rows # calculate the total area and total class edge length lsm_l_ta(landscape) #> # A tibble: 1 × 6 #> layer level class id metric value #> #> 1 1 landscape NA NA ta 0.09 lsm_c_te(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA te 181 #> 2 1 class 2 NA te 203 #> 3 1 class 3 NA te 296 # calculate all metrics on patch level calculate_lsm(landscape, level = \"patch\") #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> # A tibble: 336 × 6 #> layer level class id metric value #> #> 1 1 patch 1 1 area 0.0001 #> 2 1 patch 1 2 area 0.0005 #> 3 1 patch 1 3 area 0.0072 #> 4 1 patch 1 4 area 0.0001 #> 5 1 patch 1 5 area 0.0001 #> 6 1 patch 1 6 area 0.008 #> 7 1 patch 1 7 area 0.0016 #> 8 1 patch 1 8 area 0.0003 #> 9 1 patch 1 9 area 0.0005 #> 10 1 patch 2 10 area 0.0034 #> # ℹ 326 more rows"},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"utility-functions","dir":"","previous_headings":"Using landscapemetrics","what":"Utility functions","title":"Landscape Metrics for Categorical Map Patterns","text":"landscapemetrics provides several visualization functions, e.g. show labeled patches core area patches. visualization functions start prefix show_ (e.g. show_cores()). Important building blocks package exported help facilitate analysis development new metrics. start prefix get_. implemented Rcpp either memory performance advantages compared raster functions. details, see vignette(\"utility\").","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"contributing","dir":"","previous_headings":"Using landscapemetrics","what":"Contributing","title":"Landscape Metrics for Categorical Map Patterns","text":"One major motivations behind landscapemetrics idea provide open-source code collection landscape metrics. includes, besides bug reports, especially idea include new metrics functions. Therefore, case want suggest new metrics functions best case even contribute code, warmly welcome ! information see CONTRIBUTING. Maintainers contributors must follow repository’s CODE CONDUCT.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/index.html","id":"references","dir":"","previous_headings":"Using landscapemetrics","what":"References","title":"Landscape Metrics for Categorical Map Patterns","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org/ Nowosad J., TF Stepinski. 2019. Information theory consistent framework quantification classification landscape patterns. https://doi.org/10.1007/s10980-019-00830-x","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/augusta_nlcd.html","id":null,"dir":"Reference","previous_headings":"","what":"Augusta NLCD 2011 — augusta_nlcd","title":"Augusta NLCD 2011 — augusta_nlcd","text":"real landscape area near Augusta, Georgia obtained National Land Cover Database (NLCD)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/augusta_nlcd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augusta NLCD 2011 — augusta_nlcd","text":"","code":"augusta_nlcd"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/augusta_nlcd.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Augusta NLCD 2011 — augusta_nlcd","text":"raster object.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/augusta_nlcd.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Augusta NLCD 2011 — augusta_nlcd","text":"https://www.mrlc.gov/nlcd2011.php","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/augusta_nlcd.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Augusta NLCD 2011 — augusta_nlcd","text":"Homer, C.G., Dewitz, J.., Yang, L., Jin, S., Danielson, P., Xian, G., Coulston, J., Herold, N.D., Wickham, J.D., Megown, K., 2015, Completion 2011 National Land Cover Database conterminous United States-Representing decade land cover change information. Photogrammetric Engineering Remote Sensing, v. 81, . 5, p. 345-354","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_correlation.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate correlation — calculate_correlation","title":"Calculate correlation — calculate_correlation","text":"Calculate correlation","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_correlation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate correlation — calculate_correlation","text":"","code":"calculate_correlation( metrics, method = \"pearson\", diag = TRUE, simplify = FALSE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_correlation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate correlation — calculate_correlation","text":"metrics Tibble results returned landscapemetrics package. method Type correlation. See link{cor} details. diag FALSE, values diagonal NA. simplify TRUE one level present, tibble returned.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_correlation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate correlation — calculate_correlation","text":"list","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_correlation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate correlation — calculate_correlation","text":"functions calculates correlation metrics. order calculate correlations, landscape level one landscape needs present. input must structured returned landscapemetrics package.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_correlation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate correlation — calculate_correlation","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) metrics <- calculate_lsm(landscape, what = c(\"patch\", \"class\")) #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> Warning: Class 1: PAFRAC = NA for class with < 10 patches #> Warning: Class 3: PAFRAC = NA for class with < 10 patches calculate_correlation(metrics, method = \"pearson\") #> $patch #> # A tibble: 78 × 3 #> metric_1 metric_2 value #> #> 1 area area 1 #> 2 cai area 0.886 #> 3 circle area 0.511 #> 4 contig area 0.742 #> 5 core area 0.987 #> 6 enn area -0.443 #> 7 frac area 0.318 #> 8 gyrate area 0.952 #> 9 ncore area 0.702 #> 10 para area -0.709 #> # ℹ 68 more rows #> #> $class #> # A tibble: 1,486 × 3 #> metric_1 metric_2 value #> #> 1 ai ai 1 #> 2 area_cv ai -0.926 #> 3 area_mn ai 1.00 #> 4 area_sd ai 0.986 #> 5 ca ai 0.986 #> 6 cai_cv ai -0.973 #> 7 cai_mn ai 0.997 #> 8 cai_sd ai 0.984 #> 9 circle_cv ai -0.983 #> 10 circle_mn ai 0.990 #> # ℹ 1,476 more rows #>"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":null,"dir":"Reference","previous_headings":"","what":"calculate_lsm — calculate_lsm","title":"calculate_lsm — calculate_lsm","text":"Calculate selected group metrics","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"calculate_lsm — calculate_lsm","text":"","code":"calculate_lsm( landscape, level = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, directions = 8, count_boundary = FALSE, consider_boundary = FALSE, edge_depth = 1, cell_center = FALSE, classes_max = NULL, neighbourhood = 4, ordered = TRUE, base = \"log2\", full_name = FALSE, verbose = TRUE, progress = FALSE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"calculate_lsm — calculate_lsm","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. level Level metrics. Either 'patch', 'class' 'landscape' (vector combination). metric Abbreviation metrics (e.g. 'area'). name Full name metrics (e.g. 'core area'). type Type according FRAGSTATS grouping (e.g. 'aggregation metrics'). Selected level metrics: either \"patch\", \"class\" \"landscape\". also possible specify functions vector strings, e.g. = c(\"lsm_c_ca\", \"lsm_l_ta\"). directions number directions patches connected: 4 (rook's case) 8 (queen's case). count_boundary Include landscape boundary edge length. consider_boundary Logical cells neighbour landscape boundary considered core. edge_depth Distance (cells) cell away patch edge considered core cell. cell_center true, coordinates centroid forced cell center within patch. classes_max Potential maximum number present classes. neighbourhood number directions cell adjacencies considered neighbours: 4 (rook's case) 8 (queen's case). default 4. ordered type pairs considered. Either ordered (TRUE) unordered (FALSE). default TRUE. base unit entropy measured. default \"log2\", compute entropy \"bits\". \"log\" \"log10\" can also used. full_name full names functions included tibble. verbose Print warning messages. progress Print progress report.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"calculate_lsm — calculate_lsm","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"calculate_lsm — calculate_lsm","text":"Wrapper calculate several landscape metrics. metrics can specified arguments , level, metric, name /type (combinations different arguments possible (e.g. level = \"class\", type = \"aggregation metric\"). argument provided, automatically possibilities selected. Therefore, get available metrics, specify arguments. metrics based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"calculate_lsm — calculate_lsm","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/calculate_lsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"calculate_lsm — calculate_lsm","text":"","code":"if (FALSE) { landscape <- terra::rast(landscapemetrics::landscape) calculate_lsm(landscape, progress = TRUE) calculate_lsm(landscape, what = c(\"patch\", \"lsm_c_te\", \"lsm_l_pr\")) calculate_lsm(landscape, level = c(\"class\", \"landscape\"), type = \"aggregation metric\") }"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/check_landscape.html","id":null,"dir":"Reference","previous_headings":"","what":"Check input landscape — check_landscape","title":"Check input landscape — check_landscape","text":"Check input landscape","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/check_landscape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check input landscape — check_landscape","text":"","code":"check_landscape(landscape, verbose = TRUE)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/check_landscape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check input landscape — check_landscape","text":"landscape Raster* Layer, Stack, Brick, Stars list rasterLayers verbose Print warning messages.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/check_landscape.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check input landscape — check_landscape","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/check_landscape.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check input landscape — check_landscape","text":"function extracts basic information input landscape. includes type coordinate reference system (crs) - either \"geographic\", \"projected\", NA, units coordinate reference system, class input landscape's values number classes found landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/check_landscape.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check input landscape — check_landscape","text":"","code":"augusta_nlcd <- terra::rast(landscapemetrics::augusta_nlcd) check_landscape(augusta_nlcd) #> layer crs units class n_classes OK #> 1 1 projected m integer 15 ✔ podlasie_ccilc <- terra::rast(landscapemetrics::podlasie_ccilc) check_landscape(podlasie_ccilc) #> Warning: Caution: Coordinate reference system not metric - Units of results based on cellsizes and/or distances may be incorrect. #> layer crs units class n_classes OK #> 1 1 geographic degrees integer 14 ✖ landscape <- terra::rast(landscapemetrics::landscape) check_landscape(c(landscape, landscape)) #> Warning: Caution: Coordinate reference system not metric - Units of results based on cellsizes and/or distances may be incorrect. #> Warning: Caution: Coordinate reference system not metric - Units of results based on cellsizes and/or distances may be incorrect. #> layer crs units class n_classes OK #> 1 1 NA NA integer 3 ❓ #> 2 2 NA NA integer 3 ❓"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/construct_buffer.html","id":null,"dir":"Reference","previous_headings":"","what":"construct_buffer — construct_buffer","title":"construct_buffer — construct_buffer","text":"Internal function construct plot area around coordinates","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/construct_buffer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"construct_buffer — construct_buffer","text":"","code":"construct_buffer( coords, shape, size, return_vec = TRUE, crs = \"\", verbose = TRUE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/construct_buffer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"construct_buffer — construct_buffer","text":"coords SpatVector, sf object 2-column matrix coordinates sample points shape String specifying plot shape. Either \"circle\" \"square\" size Size sample plot. Equals radius circles side-length squares map units return_vec TRUE, vector objects returned. crs coordinate reference system used vector objects. verbose Print warning messages.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/construct_buffer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"construct_buffer — construct_buffer","text":"matrix SpatVector object","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/construct_buffer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"construct_buffer — construct_buffer","text":"","code":"coords <- matrix(c(10, 5, 25, 15, 5, 25), ncol = 2, byrow = TRUE) construct_buffer(coords = coords, shape = \"square\", size = 5) #> class : SpatVector #> geometry : polygons #> dimensions : 3, 0 (geometries, attributes) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. :"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/data_info.html","id":null,"dir":"Reference","previous_headings":"","what":"data_info — data_info","title":"data_info — data_info","text":"Data info","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/data_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"data_info — data_info","text":"","code":"data_info(landscape)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/data_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"data_info — data_info","text":"landscape RasterLayer","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/data_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"data_info — data_info","text":"raster","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/data_info.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"data_info — data_info","text":"Check class raster values number classes","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/data_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"data_info — data_info","text":"","code":"augusta_nlcd <- terra::rast(landscapemetrics::augusta_nlcd) data_info(augusta_nlcd) #> # A tibble: 1 × 2 #> class n_classes #> #> 1 integer 15 podlasie_ccilc <- terra::rast(landscapemetrics::podlasie_ccilc) data_info(podlasie_ccilc) #> # A tibble: 1 × 2 #> class n_classes #> #> 1 integer 14 landscape <- terra::rast(landscapemetrics::landscape) data_info(landscape) #> # A tibble: 1 × 2 #> class n_classes #> #> 1 integer 3"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/extract_lsm.html","id":null,"dir":"Reference","previous_headings":"","what":"extract_lsm — extract_lsm","title":"extract_lsm — extract_lsm","text":"Extract metrics","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/extract_lsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"extract_lsm — extract_lsm","text":"","code":"extract_lsm( landscape, y, extract_id = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, directions = 8, progress = FALSE, verbose = TRUE, ... )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/extract_lsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"extract_lsm — extract_lsm","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. y 2-column matrix coordinates sf point geometries. extract_id Vector id sample points. provided, sample points labelled 1...n. metric Abbreviation metrics (e.g. 'area'). name Full name metrics (e.g. 'core area') type Type according FRAGSTATS grouping (e.g. 'aggregation metrics'). Selected level metrics: either \"patch\", \"class\" \"landscape\". also possible specify functions vector strings, e.g. = c(\"lsm_c_ca\", \"lsm_l_ta\"). directions number directions patches connected: 4 (rook's case) 8 (queen's case). progress Print progress report. verbose Print warning messages. ... Arguments passed calculate_lsm().","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/extract_lsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"extract_lsm — extract_lsm","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/extract_lsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"extract_lsm — extract_lsm","text":"functions extracts metrics patches spatial object(s) y (e.g. spatial points) located within. patch level metrics possible extract. Please aware output slightly different lsm-function landscapemetrics. Returns tibble chosen metrics ID spatial objects.","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/extract_lsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"extract_lsm — extract_lsm","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) points <- matrix(c(10, 5, 25, 15, 5, 25), ncol = 2, byrow = TRUE) extract_lsm(landscape, y = points) #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> # A tibble: 36 × 7 #> layer level class id metric value extract_id #> #> 1 1 patch 3 24 area 0.0113 1 #> 2 1 patch 3 24 cai 40.7 1 #> 3 1 patch 3 24 circle 0.747 1 #> 4 1 patch 3 24 contig 0.752 1 #> 5 1 patch 3 24 core 0.0046 1 #> 6 1 patch 3 24 enn 2 1 #> 7 1 patch 3 24 frac 1.36 1 #> 8 1 patch 3 24 gyrate 5.79 1 #> 9 1 patch 3 24 ncore 3 1 #> 10 1 patch 3 24 para 0.885 1 #> # ℹ 26 more rows extract_lsm(landscape, y = points, type = \"aggregation metric\") #> Warning: Please use 'check_landscape()' to ensure the input data is valid. #> # A tibble: 3 × 7 #> layer level class id metric value extract_id #> #> 1 1 patch 3 24 enn 2 1 #> 2 1 patch 3 26 enn 2 2 #> 3 1 patch 3 23 enn 2 3 if (FALSE) { # use lines }"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_adjacencies.html","id":null,"dir":"Reference","previous_headings":"","what":"get_adjacencies — get_adjacencies","title":"get_adjacencies — get_adjacencies","text":"Fast calculation adjacencies classes raster","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_adjacencies.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_adjacencies — get_adjacencies","text":"","code":"get_adjacencies(landscape, neighbourhood = 4, what = \"full\", upper = FALSE)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_adjacencies.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_adjacencies — get_adjacencies","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. neighbourhood number directions cell adjacencies considered neighbours: 4 (rook's case), 8 (queen's case) binary matrix ones define neighbourhood. default 4. adjacencies calculate: \"full\" full adjacency matrix, \"like\" diagonal, \"unlike\" diagonal part matrix \"triangle\" triangular matrix counting adjacencies . upper Logical value indicating whether upper triangle adjacency matrix returned (default FALSE).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_adjacencies.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_adjacencies — get_adjacencies","text":"matrix adjacencies classes raster cells class.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_adjacencies.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_adjacencies — get_adjacencies","text":"fast implementation Rcpp calculate adjacency matrix raster. adjacency matrix often used landscape metrics describe configuration landscapes, cellwise count edges classes. \"full\" adjacency matrix double-count method, contains pairwise counts cells classes. diagonal matrix contains like adjacencies, count many edges shared class class. \"unlike\" adjacencies counting cellwise edges different classes.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_adjacencies.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_adjacencies — get_adjacencies","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) # calculate full adjacency matrix get_adjacencies(landscape, 4) #> $layer_1 #> 1 2 3 #> 1 542 44 137 #> 2 44 696 159 #> 3 137 159 1562 #> # equivalent with the terra package: adjacencies <- terra::adjacent(landscape, 1:terra::ncell(landscape), \"rook\", pairs = TRUE) table(terra::values(landscape, mat = FALSE)[adjacencies[,1]], terra::values(landscape, mat = FALSE)[adjacencies[,2]]) #> #> 1 2 3 #> 1 542 44 137 #> 2 44 696 159 #> 3 137 159 1562 # count diagonal neighbour adjacencies diagonal_matrix <- matrix(c(1, NA, 1, NA, 0, NA, 1, NA, 1), 3, 3, byrow = TRUE) get_adjacencies(landscape, diagonal_matrix) #> $layer_1 #> 1 2 3 #> 1 486 56 169 #> 2 56 592 215 #> 3 169 215 1406 #>"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_area_patches.html","id":null,"dir":"Reference","previous_headings":"","what":"get_area_patches — get_area_patches","title":"get_area_patches — get_area_patches","text":"Get areas patches class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_area_patches.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_area_patches — get_area_patches","text":"","code":"get_area_patches(class_patches, classes, resolution)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_area_patches.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_area_patches — get_area_patches","text":"class_patches list matrices patches class (output get_class_patches) classes vector unique values (output get_unique_values_int) resolution vector two numbers (usually calculated using terra::res)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_area_patches.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_area_patches — get_area_patches","text":"list vectors areas patches class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_area_patches.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_area_patches — get_area_patches","text":"Calculate areas patches class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_area_patches.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_area_patches — get_area_patches","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_mat <- terra::as.matrix(landscape, wide = TRUE) classes <- landscapemetrics:::get_unique_values_int(landscape_mat) class_patches <- get_class_patches(landscape_mat, classes, directions = 8) area_patches <- get_area_patches(class_patches, classes, resolution = terra::res(landscape))"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_boundaries.html","id":null,"dir":"Reference","previous_headings":"","what":"get_boundaries — get_boundaries","title":"get_boundaries — get_boundaries","text":"Get boundary cells patches","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_boundaries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_boundaries — get_boundaries","text":"","code":"get_boundaries( landscape, consider_boundary = FALSE, edge_depth = 1, as_NA = FALSE, patch_id = FALSE, return_raster = TRUE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_boundaries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_boundaries — get_boundaries","text":"landscape SpatRaster matrix. consider_boundary Logical cells neighbour landscape boundary considered edge. edge_depth Distance (cells) cell away patch edge considered core cell. as_NA true, non-boundary cells area labeld NA. patch_id true, boundary/edge cells labeled original patch id. return_raster false, matrix returned.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_boundaries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_boundaries — get_boundaries","text":"List SpatRaster matrix","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_boundaries.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_boundaries — get_boundaries","text":"boundary/edge cells labeled 1, non-boundary cells 0. NA values changed. Boundary cells defined cells neighbour either NA cell cell different value . Non-boundary cells neighbour cells value themself.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_boundaries.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_boundaries — get_boundaries","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) class_1 <- get_patches(landscape, class = 1)[[1]][[1]] get_boundaries(class_1) #> [[1]] #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : lyr.1 #> min value : 0 #> max value : 1 #> get_boundaries(class_1, return_raster = FALSE) #> [[1]] #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 1 NA NA NA NA NA NA NA NA NA NA NA NA #> [2,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [3,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [4,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [5,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [6,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [7,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [8,] 1 NA NA NA NA NA NA NA NA NA NA NA NA #> [9,] 1 NA NA NA NA NA NA NA NA NA NA NA NA #> [10,] 1 1 NA NA NA NA NA NA NA NA NA NA NA #> [11,] 1 NA NA NA NA NA NA NA NA NA NA NA NA #> [12,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [13,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [14,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [15,] 1 1 NA NA NA NA NA NA NA NA NA 1 1 #> [16,] 1 0 1 1 1 NA NA NA NA NA 1 0 0 #> [17,] 1 1 0 0 0 1 NA NA NA NA 1 0 0 #> [18,] NA NA 1 0 0 0 1 NA 1 1 0 0 0 #> [19,] NA NA 1 0 0 0 0 1 0 0 0 0 0 #> [20,] NA NA NA 1 0 0 0 0 0 0 0 0 1 #> [21,] NA NA NA NA 1 1 1 1 0 0 0 1 1 #> [22,] NA NA NA NA NA NA NA NA 1 1 1 NA NA #> [23,] NA NA NA NA NA NA NA NA 1 NA NA NA NA #> [24,] NA NA NA NA NA NA NA 1 NA NA NA NA NA #> [25,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [26,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [27,] NA NA NA NA NA NA NA NA NA NA NA 1 NA #> [28,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [29,] NA NA NA NA NA NA NA NA NA NA NA NA NA #> [30,] NA NA NA NA NA 1 NA NA NA NA NA NA NA #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] #> [1,] NA NA NA NA NA NA NA NA NA 1 NA NA #> [2,] NA NA NA NA NA NA NA NA 1 1 NA NA #> [3,] NA NA NA NA NA NA NA 1 0 0 1 1 #> [4,] NA NA 1 1 1 1 1 0 0 0 0 1 #> [5,] 1 1 0 0 0 0 0 0 0 0 1 NA #> [6,] 1 0 0 0 0 0 0 0 0 1 NA NA #> [7,] NA 1 0 0 0 0 0 0 0 1 NA NA #> [8,] NA NA 1 0 1 1 0 0 0 0 1 NA #> [9,] NA NA 1 1 NA NA 1 0 1 1 NA NA #> [10,] NA NA NA NA NA NA NA 1 NA NA NA NA #> [11,] NA NA NA NA NA 1 1 1 NA NA NA NA #> [12,] NA NA NA NA 1 0 1 NA NA NA NA NA #> [13,] NA NA NA NA 1 0 1 NA NA NA NA NA #> [14,] NA NA 1 1 0 1 1 NA NA NA NA NA #> [15,] 1 NA NA 1 1 NA NA NA NA NA NA NA #> [16,] 0 1 NA NA NA NA NA NA NA NA NA NA #> [17,] 1 NA NA NA NA NA NA NA NA NA NA NA #> [18,] 1 NA NA NA NA NA NA NA NA NA NA NA #> [19,] 1 NA NA NA NA NA NA NA NA NA NA NA #> [20,] NA NA NA NA NA NA NA NA NA NA NA NA #> [21,] NA 1 NA NA 1 1 NA NA NA NA NA NA #> [22,] NA 1 1 1 0 0 1 NA NA NA NA NA #> [23,] NA 1 0 1 1 1 1 NA NA NA NA NA #> [24,] NA NA 1 NA NA NA NA NA NA NA NA NA #> [25,] NA NA NA NA NA NA NA NA NA NA NA NA #> [26,] NA NA NA NA NA NA NA NA NA NA NA NA #> [27,] NA NA NA NA NA NA NA NA NA NA NA NA #> [28,] NA NA NA NA NA NA NA NA NA NA NA NA #> [29,] NA NA NA NA NA NA 1 NA NA NA NA NA #> [30,] NA NA NA NA NA NA NA 1 1 NA NA NA #> [,26] [,27] [,28] [,29] [,30] #> [1,] NA NA NA NA NA #> [2,] NA NA NA NA NA #> [3,] NA NA NA NA NA #> [4,] NA NA NA NA NA #> [5,] NA NA NA NA NA #> [6,] NA NA NA NA NA #> [7,] NA NA NA NA NA #> [8,] NA NA NA NA NA #> [9,] NA NA NA NA NA #> [10,] NA NA NA NA NA #> [11,] NA NA NA NA NA #> [12,] NA NA NA NA NA #> [13,] NA NA NA NA NA #> [14,] NA NA NA NA NA #> [15,] NA NA NA NA NA #> [16,] NA NA NA NA NA #> [17,] NA NA NA NA NA #> [18,] NA NA NA NA NA #> [19,] NA NA NA NA NA #> [20,] NA NA NA NA NA #> [21,] NA NA NA NA NA #> [22,] NA NA NA NA NA #> [23,] NA NA NA NA NA #> [24,] NA NA NA NA NA #> [25,] NA NA NA NA NA #> [26,] NA NA NA NA NA #> [27,] NA 1 NA NA NA #> [28,] 1 1 NA NA NA #> [29,] 1 1 NA NA NA #> [30,] NA NA NA NA NA #>"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_centroids.html","id":null,"dir":"Reference","previous_headings":"","what":"get_centroids — get_centroids","title":"get_centroids — get_centroids","text":"Centroid patches","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_centroids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_centroids — get_centroids","text":"","code":"get_centroids( landscape, directions = 8, cell_center = FALSE, return_vec = FALSE, verbose = TRUE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_centroids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_centroids — get_centroids","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. directions number directions patches connected: 4 (rook's case) 8 (queen's case). cell_center true, coordinates centroid forced cell center within patch. return_vec true, sf object returned. verbose Print warning messages","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_centroids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_centroids — get_centroids","text":"Get coordinates centroid patch. centroid default defined mean location cell centers. force centroid located within patch, use cell_center argument. case, centroid defined cell center closest mean location.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_centroids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_centroids — get_centroids","text":"","code":"# get centroid location landscape <- terra::rast(landscapemetrics::landscape) get_centroids(landscape) #> Warning: Double values will be converted to integer. #> # A tibble: 28 × 6 #> layer level class id x y #> #> 1 1 patch 1 1 0.5 29.5 #> 2 1 patch 1 2 0.7 20.9 #> 3 1 patch 1 3 7.86 12.0 #> 4 1 patch 1 4 5.5 0.5 #> 5 1 patch 1 5 11.5 3.5 #> 6 1 patch 1 6 19.2 23.2 #> 7 1 patch 1 7 16.9 8.19 #> 8 1 patch 1 8 20.5 0.833 #> 9 1 patch 1 9 26.1 2.3 #> 10 1 patch 2 1 2.65 25.1 #> # ℹ 18 more rows"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_circumscribingcircle.html","id":null,"dir":"Reference","previous_headings":"","what":"get_circumscribingcircle — get_circumscribingcircle","title":"get_circumscribingcircle — get_circumscribingcircle","text":"Diameter circumscribing circle around patches","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_circumscribingcircle.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_circumscribingcircle — get_circumscribingcircle","text":"","code":"get_circumscribingcircle(landscape, directions = 8, level = \"patch\")"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_circumscribingcircle.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_circumscribingcircle — get_circumscribingcircle","text":"landscape SpatRaster matrix (x, y, id columns) directions number directions patches connected: 4 (rook's case) 8 (queen's case). level Either 'patch' 'class' corresponding level.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_circumscribingcircle.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_circumscribingcircle — get_circumscribingcircle","text":"diameter smallest circumscribing circle around patch landscape based maximum distance corners cell. ensures cells patch included patch. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_circumscribingcircle.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"get_circumscribingcircle — get_circumscribingcircle","text":"Based C++ code Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_circumscribingcircle.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_circumscribingcircle — get_circumscribingcircle","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) # get circle around each patch get_circumscribingcircle(landscape) #> # A tibble: 28 × 7 #> layer level class id value center_x center_y #> #> 1 1 patch 1 1 1.41 0.5 29.5 #> 2 1 patch 1 2 4.12 0.5 21 #> 3 1 patch 1 3 15.5 7.38 13.7 #> 4 1 patch 1 4 1.41 5.5 0.5 #> 5 1 patch 1 5 1.41 11.5 3.5 #> 6 1 patch 1 6 16.6 19.5 22.5 #> 7 1 patch 1 7 6.71 17 8.5 #> 8 1 patch 1 8 3.61 20.5 1 #> 9 1 patch 1 9 3.61 26 2.5 #> 10 1 patch 2 10 10.8 3.73 25.1 #> # ℹ 18 more rows # get circle around whole class get_circumscribingcircle(landscape, level = \"class\") #> # A tibble: 3 × 7 #> layer level class id value center_x center_y #> #> 1 1 class 1 NA 39.6 13.5 15.5 #> 2 1 class 2 NA 41.7 15 14.5 #> 3 1 class 3 NA 42.4 15 15"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_class_patches.html","id":null,"dir":"Reference","previous_headings":"","what":"get_class_patches — get_class_patches","title":"get_class_patches — get_class_patches","text":"Get patches class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_class_patches.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_class_patches — get_class_patches","text":"","code":"get_class_patches(landscape_mat, classes, directions)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_class_patches.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_class_patches — get_class_patches","text":"landscape_mat matrix object classes vector unique values (output get_unique_values_int) directions number directions patches connected: 4 (rook's case) 8 (queen's case).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_class_patches.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_class_patches — get_class_patches","text":"list matrices patches class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_class_patches.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_class_patches — get_class_patches","text":"Calculate patches class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_class_patches.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_class_patches — get_class_patches","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_mat <- terra::as.matrix(landscape, wide = TRUE) classes <- landscapemetrics:::get_unique_values_int(landscape_mat) class_patches <- get_class_patches(landscape_mat, classes, directions = 8)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_complexity.html","id":null,"dir":"Reference","previous_headings":"","what":"get_complexity — get_complexity","title":"get_complexity — get_complexity","text":"Calculate complexity landscape","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_complexity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_complexity — get_complexity","text":"","code":"get_complexity(landscape_mat, neighbourhood, ordered, base)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_complexity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_complexity — get_complexity","text":"landscape_mat matrix object neighbourhood number directions cell adjacencies considered neighbours: 4 (rook's case) 8 (queen's case). default 4. ordered type pairs considered. Either ordered (TRUE) unordered (FALSE). base unit entropy measured. default \"log2\",","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_complexity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_complexity — get_complexity","text":"matrix","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_complexity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_complexity — get_complexity","text":"Calculate complexity landscape: entropy co-occurrence matrix","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_complexity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_complexity — get_complexity","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_mat <- terra::as.matrix(landscape, wide = TRUE) get_complexity(landscape_mat, neighbourhood = 4, ordered = TRUE, base = \"log2\") #> [1] 2.334659"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_enn_patch.html","id":null,"dir":"Reference","previous_headings":"","what":"get_enn_patch — get_enn_patch","title":"get_enn_patch — get_enn_patch","text":"Euclidean Nearest-Neighbor Distance","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_enn_patch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_enn_patch — get_enn_patch","text":"","code":"get_enn_patch(classes, class_patches, points, resolution, verbose = FALSE)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_enn_patch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_enn_patch — get_enn_patch","text":"classes vector unique values (output get_unique_values_int) class_patches list matrices patches class (output get_class_patches) points matrix three columns: col, row, value (output get_points) resolution vector two numbers (usually calculated using terra::res) verbose logical indicating whether print warnings","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_enn_patch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_enn_patch — get_enn_patch","text":"tibble two columns: class, value","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_enn_patch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_enn_patch — get_enn_patch","text":"Calculate Euclidean Nearest-Neighbor Distance patch class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_enn_patch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_enn_patch — get_enn_patch","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_mat <- terra::as.matrix(landscape, wide = TRUE) classes <- landscapemetrics:::get_unique_values_int(landscape_mat) class_patches <- get_class_patches(landscape_mat, classes, directions = 8) points <- get_points(landscape_mat, terra::res(landscape)) enns <- get_enn_patch(classes, class_patches, points, terra::res(landscape))"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_nearestneighbour.html","id":null,"dir":"Reference","previous_headings":"","what":"get_nearestneighbour — get_nearestneighbour","title":"get_nearestneighbour — get_nearestneighbour","text":"Euclidean distance nearest neighbour","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_nearestneighbour.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_nearestneighbour — get_nearestneighbour","text":"","code":"get_nearestneighbour(landscape, return_id = FALSE)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_nearestneighbour.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_nearestneighbour — get_nearestneighbour","text":"landscape SpatRaster matrix (x,y,id columns). return_id TRUE, also patch ID nearest neighbour returned.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_nearestneighbour.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_nearestneighbour — get_nearestneighbour","text":"Fast memory safe Rcpp implementation calculating minimum Euclidean distances nearest patch class raster matrix. patches need unique ID (see get_patches). Please aware patch ID identical patch ID metric functions (lsm_). return_ID = TRUE, focal patches several nearest neighbour patches might returned. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_nearestneighbour.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"get_nearestneighbour — get_nearestneighbour","text":"Based RCpp code Florian Privé florian.prive.21@gmail.com","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_nearestneighbour.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_nearestneighbour — get_nearestneighbour","text":"","code":"# get patches for class 1 landscape <- terra::rast(landscapemetrics::landscape) class_1 <- get_patches(landscape, class = 2)[[1]][[1]] # calculate the distance between patches get_nearestneighbour(class_1) #> # A tibble: 13 × 3 #> layer id dist #> #> 1 1 10 4.47 #> 2 1 11 5.83 #> 3 1 12 2.83 #> 4 1 13 4.12 #> 5 1 14 3 #> 6 1 15 3 #> 7 1 16 3.16 #> 8 1 17 3 #> 9 1 18 3 #> 10 1 19 2.83 #> 11 1 20 5.83 #> 12 1 21 2.83 #> 13 1 22 3 get_nearestneighbour(class_1, return_id = TRUE) #> # A tibble: 15 × 4 #> layer id dist id_neighbour #> #> 1 1 10 4.47 14 #> 2 1 11 5.83 13 #> 3 1 12 2.83 19 #> 4 1 13 4.12 12 #> 5 1 14 3 15 #> 6 1 15 3 14 #> 7 1 16 3.16 15 #> 8 1 17 3 18 #> 9 1 18 3 12 #> 10 1 18 3 17 #> 11 1 19 2.83 12 #> 12 1 19 2.83 21 #> 13 1 20 5.83 22 #> 14 1 21 2.83 19 #> 15 1 22 3 19"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":null,"dir":"Reference","previous_headings":"","what":"get_patches — get_patches","title":"get_patches — get_patches","text":"Connected components labeling derive patches landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_patches — get_patches","text":"","code":"get_patches( landscape, class = \"all\", directions = 8, to_disk = getOption(\"to_disk\", default = FALSE), return_raster = TRUE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_patches — get_patches","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. class Either \"\" (default) every class raster, specify class value. See Details. directions number directions patches connected: 4 (rook's case) 8 (queen's case). to_disk Logical argument, FALSE results get_patches hold memory. true, get_patches writes temporary files hence, hold everything memory. Can set global option, e.g. option(to_disk = TRUE). See Details. return_raster false, matrix returned","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_patches — get_patches","text":"List SpatRaster","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_patches — get_patches","text":"Searches connected patches (neighbouring cells class ). 8-neighbours rule ('queen's case) 4-neighbours rule (rook's case) used. Returns list raster. class connected patches value 1 - n. cells belonging class NA. Landscape metrics rely delineation patches. Hence, get_patches heavily used landscapemetrics. raster can quite big, fact get_patches creates copy raster class landscape becomes burden computer memory. Hence, argument to_disk allows store results connected labeling algorithm disk. Furthermore, option can set globally, every function internally uses get_patches can make use .","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"get_patches — get_patches","text":"Vincent, L., Soille, P. 1991. Watersheds digital spaces: efficient algorithm based immersion simulations. IEEE Transactions Pattern Analysis Machine Intelligence. 13 (6), 583-598","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_patches.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_patches — get_patches","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) # check for patches of class 1 patched_raster <- get_patches(landscape, class = 1) # count patches nrow(terra::unique(patched_raster[[1]][[1]])) #> [1] 9 # check for patches of every class patched_raster <- get_patches(landscape)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_perimeter_patch.html","id":null,"dir":"Reference","previous_headings":"","what":"get_perimeter_patch — get_perimeter_patch","title":"get_perimeter_patch — get_perimeter_patch","text":"Perimeter patch class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_perimeter_patch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_perimeter_patch — get_perimeter_patch","text":"","code":"get_perimeter_patch(classes, class_patches, resolution)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_perimeter_patch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_perimeter_patch — get_perimeter_patch","text":"classes vector unique values (output get_unique_values_int) class_patches list matrices patches class (output get_class_patches) resolution vector two numbers (usually calculated using terra::res)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_perimeter_patch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_perimeter_patch — get_perimeter_patch","text":"tibble two columns: class, value","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_perimeter_patch.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_perimeter_patch — get_perimeter_patch","text":"Calculate perimeter patch class","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_perimeter_patch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_perimeter_patch — get_perimeter_patch","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_mat <- terra::as.matrix(landscape, wide = TRUE) classes <- landscapemetrics:::get_unique_values_int(landscape_mat) class_patches <- get_class_patches(landscape_mat, classes, directions = 8) pp <- get_perimeter_patch(classes, class_patches, terra::res(landscape))"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_points.html","id":null,"dir":"Reference","previous_headings":"","what":"get_points — get_points","title":"get_points — get_points","text":"Raster col, row, value","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_points — get_points","text":"","code":"get_points(landscape_mat, resolution)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_points — get_points","text":"landscape_mat matrix object resolution vector two numbers (usually calculated using terra::res)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get_points — get_points","text":"matrix three columns: col, row, value","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_points — get_points","text":"col row values multiplied resolution get (internal) coordinates points.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_points — get_points","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_mat <- terra::as.matrix(landscape, wide = TRUE) resolution <- terra::res(landscape) get_points(landscape_mat, resolution) #> col row value #> [1,] 1 1 1 #> [2,] 2 1 2 #> [3,] 3 1 2 #> [4,] 4 1 2 #> [5,] 5 1 2 #> [6,] 6 1 2 #> [7,] 7 1 2 #> [8,] 8 1 1 #> [9,] 9 1 1 #> [10,] 10 1 1 #> [11,] 11 1 1 #> [12,] 12 1 3 #> [13,] 13 1 3 #> [14,] 14 1 3 #> [15,] 15 1 1 #> [16,] 16 1 1 #> [17,] 17 1 1 #> [18,] 18 1 3 #> [19,] 19 1 2 #> [20,] 20 1 3 #> [21,] 21 1 3 #> [22,] 22 1 3 #> [23,] 23 1 3 #> [24,] 24 1 3 #> [25,] 25 1 3 #> [26,] 26 1 3 #> [27,] 27 1 3 #> [28,] 28 1 3 #> [29,] 29 1 3 #> [30,] 30 1 3 #> [31,] 1 2 3 #> [32,] 2 2 2 #> [33,] 3 2 2 #> [34,] 4 2 2 #> [35,] 5 2 2 #> [36,] 6 2 2 #> [37,] 7 2 2 #> [38,] 8 2 2 #> [39,] 9 2 2 #> [40,] 10 2 1 #> [41,] 11 2 3 #> [42,] 12 2 3 #> [43,] 13 2 3 #> [44,] 14 2 3 #> [45,] 15 2 1 #> [46,] 16 2 1 #> [47,] 17 2 1 #> [48,] 18 2 3 #> [49,] 19 2 3 #> [50,] 20 2 3 #> [51,] 21 2 3 #> [52,] 22 2 3 #> [53,] 23 2 3 #> [54,] 24 2 3 #> [55,] 25 2 3 #> [56,] 26 2 3 #> [57,] 27 2 3 #> [58,] 28 2 3 #> [59,] 29 2 3 #> [60,] 30 2 3 #> [61,] 1 3 3 #> [62,] 2 3 3 #> [63,] 3 3 3 #> [64,] 4 3 3 #> [65,] 5 3 2 #> [66,] 6 3 2 #> [67,] 7 3 2 #> [68,] 8 3 2 #> [69,] 9 3 2 #> [70,] 10 3 2 #> [71,] 11 3 3 #> [72,] 12 3 3 #> [73,] 13 3 3 #> [74,] 14 3 3 #> [75,] 15 3 3 #> [76,] 16 3 1 #> [77,] 17 3 1 #> [78,] 18 3 1 #> [79,] 19 3 1 #> [80,] 20 3 3 #> [81,] 21 3 3 #> [82,] 22 3 3 #> [83,] 23 3 3 #> [84,] 24 3 3 #> [85,] 25 3 3 #> [86,] 26 3 3 #> [87,] 27 3 3 #> [88,] 28 3 3 #> [89,] 29 3 3 #> [90,] 30 3 3 #> [91,] 1 4 3 #> [92,] 2 4 3 #> [93,] 3 4 3 #> [94,] 4 4 2 #> [95,] 5 4 2 #> [96,] 6 4 2 #> [97,] 7 4 2 #> [98,] 8 4 2 #> [99,] 9 4 3 #> [100,] 10 4 3 #> [101,] 11 4 3 #> [102,] 12 4 3 #> [103,] 13 4 3 #> [104,] 14 4 3 #> [105,] 15 4 3 #> [106,] 16 4 1 #> [107,] 17 4 1 #> [108,] 18 4 1 #> [109,] 19 4 1 #> [110,] 20 4 1 #> [111,] 21 4 3 #> [112,] 22 4 3 #> [113,] 23 4 3 #> [114,] 24 4 3 #> [115,] 25 4 3 #> [116,] 26 4 3 #> [117,] 27 4 3 #> [118,] 28 4 3 #> [119,] 29 4 3 #> [120,] 30 4 3 #> [121,] 1 5 3 #> [122,] 2 5 2 #> [123,] 3 5 2 #> [124,] 4 5 2 #> [125,] 5 5 2 #> [126,] 6 5 2 #> [127,] 7 5 2 #> [128,] 8 5 2 #> [129,] 9 5 3 #> [130,] 10 5 3 #> [131,] 11 5 3 #> [132,] 12 5 3 #> [133,] 13 5 3 #> [134,] 14 5 3 #> [135,] 15 5 3 #> [136,] 16 5 1 #> [137,] 17 5 1 #> [138,] 18 5 1 #> [139,] 19 5 1 #> [140,] 20 5 1 #> [141,] 21 5 1 #> [142,] 22 5 3 #> [143,] 23 5 3 #> [144,] 24 5 3 #> [145,] 25 5 3 #> [146,] 26 5 3 #> [147,] 27 5 2 #> [148,] 28 5 2 #> [149,] 29 5 3 #> [150,] 30 5 3 #> [151,] 1 6 2 #> [152,] 2 6 2 #> [153,] 3 6 3 #> [154,] 4 6 3 #> [155,] 5 6 3 #> [156,] 6 6 3 #> [157,] 7 6 3 #> [158,] 8 6 3 #> [159,] 9 6 3 #> [160,] 10 6 3 #> [161,] 11 6 3 #> [162,] 12 6 3 #> [163,] 13 6 3 #> [164,] 14 6 3 #> [165,] 15 6 3 #> [166,] 16 6 3 #> [167,] 17 6 1 #> [168,] 18 6 1 #> [169,] 19 6 1 #> [170,] 20 6 1 #> [171,] 21 6 1 #> [172,] 22 6 2 #> [173,] 23 6 3 #> [174,] 24 6 3 #> [175,] 25 6 3 #> [176,] 26 6 3 #> [177,] 27 6 2 #> [178,] 28 6 2 #> [179,] 29 6 2 #> [180,] 30 6 1 #> [181,] 1 7 3 #> [182,] 2 7 3 #> [183,] 3 7 3 #> [184,] 4 7 3 #> [185,] 5 7 3 #> [186,] 6 7 3 #> [187,] 7 7 3 #> [188,] 8 7 3 #> [189,] 9 7 3 #> [190,] 10 7 3 #> [191,] 11 7 3 #> [192,] 12 7 2 #> [193,] 13 7 2 #> [194,] 14 7 3 #> [195,] 15 7 3 #> [196,] 16 7 3 #> [197,] 17 7 3 #> [198,] 18 7 1 #> [199,] 19 7 1 #> [200,] 20 7 1 #> [201,] 21 7 1 #> [202,] 22 7 3 #> [203,] 23 7 3 #> [204,] 24 7 3 #> [205,] 25 7 3 #> [206,] 26 7 2 #> [207,] 27 7 2 #> [208,] 28 7 2 #> [209,] 29 7 2 #> [210,] 30 7 2 #> [211,] 1 8 3 #> [212,] 2 8 3 #> [213,] 3 8 3 #> [214,] 4 8 3 #> [215,] 5 8 3 #> [216,] 6 8 3 #> [217,] 7 8 3 #> [218,] 8 8 3 #> [219,] 9 8 3 #> [220,] 10 8 3 #> [221,] 11 8 3 #> [222,] 12 8 3 #> [223,] 13 8 3 #> [224,] 14 8 3 #> [225,] 15 8 3 #> [226,] 16 8 3 #> [227,] 17 8 3 #> [228,] 18 8 3 #> [229,] 19 8 1 #> [230,] 20 8 1 #> [231,] 21 8 1 #> [232,] 22 8 3 #> [233,] 23 8 3 #> [234,] 24 8 1 #> [235,] 25 8 3 #> [236,] 26 8 3 #> [237,] 27 8 3 #> [238,] 28 8 2 #> [239,] 29 8 2 #> [240,] 30 8 2 #> [241,] 1 9 3 #> [242,] 2 9 3 #> [243,] 3 9 3 #> [244,] 4 9 3 #> [245,] 5 9 3 #> [246,] 6 9 3 #> [247,] 7 9 3 #> [248,] 8 9 3 #> [249,] 9 9 3 #> [250,] 10 9 3 #> [251,] 11 9 3 #> [252,] 12 9 3 #> [253,] 13 9 3 #> [254,] 14 9 3 #> [255,] 15 9 3 #> [256,] 16 9 3 #> [257,] 17 9 3 #> [258,] 18 9 1 #> [259,] 19 9 1 #> [260,] 20 9 1 #> [261,] 21 9 1 #> [262,] 22 9 1 #> [263,] 23 9 1 #> [264,] 24 9 3 #> [265,] 25 9 3 #> [266,] 26 9 3 #> [267,] 27 9 2 #> [268,] 28 9 2 #> [269,] 29 9 2 #> [270,] 30 9 2 #> [271,] 1 10 3 #> [272,] 2 10 3 #> [273,] 3 10 3 #> [274,] 4 10 3 #> [275,] 5 10 3 #> [276,] 6 10 3 #> [277,] 7 10 3 #> [278,] 8 10 3 #> [279,] 9 10 3 #> [280,] 10 10 3 #> [281,] 11 10 3 #> [282,] 12 10 3 #> [283,] 13 10 2 #> [284,] 14 10 3 #> [285,] 15 10 3 #> [286,] 16 10 3 #> [287,] 17 10 2 #> [288,] 18 10 1 #> [289,] 19 10 1 #> [290,] 20 10 1 #> [291,] 21 10 1 #> [292,] 22 10 1 #> [293,] 23 10 3 #> [294,] 24 10 3 #> [295,] 25 10 3 #> [296,] 26 10 3 #> [297,] 27 10 2 #> [298,] 28 10 2 #> [299,] 29 10 2 #> [300,] 30 10 2 #> [301,] 1 11 3 #> [302,] 2 11 3 #> [303,] 3 11 3 #> [304,] 4 11 3 #> [305,] 5 11 3 #> [306,] 6 11 3 #> [307,] 7 11 3 #> [308,] 8 11 3 #> [309,] 9 11 3 #> [310,] 10 11 3 #> [311,] 11 11 3 #> [312,] 12 11 2 #> [313,] 13 11 2 #> [314,] 14 11 2 #> [315,] 15 11 3 #> [316,] 16 11 1 #> [317,] 17 11 1 #> [318,] 18 11 1 #> [319,] 19 11 1 #> [320,] 20 11 1 #> [321,] 21 11 1 #> [322,] 22 11 1 #> [323,] 23 11 3 #> [324,] 24 11 3 #> [325,] 25 11 3 #> [326,] 26 11 3 #> [327,] 27 11 2 #> [328,] 28 11 2 #> [329,] 29 11 2 #> [330,] 30 11 2 #> [331,] 1 12 3 #> [332,] 2 12 3 #> [333,] 3 12 3 #> [334,] 4 12 3 #> [335,] 5 12 3 #> [336,] 6 12 3 #> [337,] 7 12 3 #> [338,] 8 12 3 #> [339,] 9 12 3 #> [340,] 10 12 3 #> [341,] 11 12 3 #> [342,] 12 12 2 #> [343,] 13 12 2 #> [344,] 14 12 2 #> [345,] 15 12 1 #> [346,] 16 12 1 #> [347,] 17 12 1 #> [348,] 18 12 1 #> [349,] 19 12 1 #> [350,] 20 12 1 #> [351,] 21 12 1 #> [352,] 22 12 3 #> [353,] 23 12 3 #> [354,] 24 12 3 #> [355,] 25 12 3 #> [356,] 26 12 3 #> [357,] 27 12 1 #> [358,] 28 12 2 #> [359,] 29 12 2 #> [360,] 30 12 2 #> [361,] 1 13 3 #> [362,] 2 13 3 #> [363,] 3 13 3 #> [364,] 4 13 3 #> [365,] 5 13 3 #> [366,] 6 13 2 #> [367,] 7 13 2 #> [368,] 8 13 2 #> [369,] 9 13 2 #> [370,] 10 13 2 #> [371,] 11 13 2 #> [372,] 12 13 2 #> [373,] 13 13 2 #> [374,] 14 13 3 #> [375,] 15 13 1 #> [376,] 16 13 1 #> [377,] 17 13 1 #> [378,] 18 13 1 #> [379,] 19 13 1 #> [380,] 20 13 1 #> [381,] 21 13 1 #> [382,] 22 13 3 #> [383,] 23 13 3 #> [384,] 24 13 3 #> [385,] 25 13 3 #> [386,] 26 13 3 #> [387,] 27 13 3 #> [388,] 28 13 2 #> [389,] 29 13 2 #> [390,] 30 13 2 #> [391,] 1 14 3 #> [392,] 2 14 3 #> [393,] 3 14 3 #> [394,] 4 14 3 #> [395,] 5 14 1 #> [396,] 6 14 1 #> [397,] 7 14 2 #> [398,] 8 14 2 #> [399,] 9 14 2 #> [400,] 10 14 2 #> [401,] 11 14 2 #> [402,] 12 14 2 #> [403,] 13 14 3 #> [404,] 14 14 3 #> [405,] 15 14 1 #> [406,] 16 14 1 #> [407,] 17 14 1 #> [408,] 18 14 1 #> [409,] 19 14 1 #> [410,] 20 14 3 #> [411,] 21 14 2 #> [412,] 22 14 3 #> [413,] 23 14 3 #> [414,] 24 14 2 #> [415,] 25 14 2 #> [416,] 26 14 3 #> [417,] 27 14 3 #> [418,] 28 14 2 #> [419,] 29 14 2 #> [420,] 30 14 2 #> [421,] 1 15 3 #> [422,] 2 15 3 #> [423,] 3 15 3 #> [424,] 4 15 3 #> [425,] 5 15 1 #> [426,] 6 15 1 #> [427,] 7 15 1 #> [428,] 8 15 2 #> [429,] 9 15 2 #> [430,] 10 15 3 #> [431,] 11 15 3 #> [432,] 12 15 2 #> [433,] 13 15 3 #> [434,] 14 15 3 #> [435,] 15 15 3 #> [436,] 16 15 1 #> [437,] 17 15 3 #> [438,] 18 15 3 #> [439,] 19 15 3 #> [440,] 20 15 3 #> [441,] 21 15 1 #> [442,] 22 15 1 #> [443,] 23 15 1 #> [444,] 24 15 3 #> [445,] 25 15 3 #> [446,] 26 15 3 #> [447,] 27 15 3 #> [448,] 28 15 2 #> [449,] 29 15 2 #> [450,] 30 15 3 #> [451,] 1 16 3 #> [452,] 2 16 3 #> [453,] 3 16 3 #> [454,] 4 16 1 #> [455,] 5 16 1 #> [456,] 6 16 1 #> [457,] 7 16 1 #> [458,] 8 16 1 #> [459,] 9 16 1 #> [460,] 10 16 3 #> [461,] 11 16 3 #> [462,] 12 16 3 #> [463,] 13 16 3 #> [464,] 14 16 1 #> [465,] 15 16 3 #> [466,] 16 16 3 #> [467,] 17 16 3 #> [468,] 18 16 3 #> [469,] 19 16 3 #> [470,] 20 16 3 #> [471,] 21 16 3 #> [472,] 22 16 1 #> [473,] 23 16 1 #> [474,] 24 16 1 #> [475,] 25 16 3 #> [476,] 26 16 3 #> [477,] 27 16 3 #> [478,] 28 16 3 #> [479,] 29 16 3 #> [480,] 30 16 3 #> [481,] 1 17 3 #> [482,] 2 17 3 #> [483,] 3 17 3 #> [484,] 4 17 1 #> [485,] 5 17 1 #> [486,] 6 17 1 #> [487,] 7 17 1 #> [488,] 8 17 1 #> [489,] 9 17 1 #> [490,] 10 17 3 #> [491,] 11 17 3 #> [492,] 12 17 3 #> [493,] 13 17 3 #> [494,] 14 17 1 #> [495,] 15 17 1 #> [496,] 16 17 3 #> [497,] 17 17 3 #> [498,] 18 17 3 #> [499,] 19 17 3 #> [500,] 20 17 3 #> [501,] 21 17 3 #> [502,] 22 17 1 #> [503,] 23 17 1 #> [504,] 24 17 2 #> [505,] 25 17 2 #> [506,] 26 17 2 #> [507,] 27 17 3 #> [508,] 28 17 3 #> [509,] 29 17 3 #> [510,] 30 17 3 #> [511,] 1 18 3 #> [512,] 2 18 3 #> [513,] 3 18 3 #> [514,] 4 18 1 #> [515,] 5 18 1 #> [516,] 6 18 1 #> [517,] 7 18 1 #> [518,] 8 18 1 #> [519,] 9 18 3 #> [520,] 10 18 3 #> [521,] 11 18 3 #> [522,] 12 18 1 #> [523,] 13 18 1 #> [524,] 14 18 1 #> [525,] 15 18 1 #> [526,] 16 18 3 #> [527,] 17 18 3 #> [528,] 18 18 3 #> [529,] 19 18 3 #> [530,] 20 18 3 #> [531,] 21 18 1 #> [532,] 22 18 1 #> [533,] 23 18 1 #> [534,] 24 18 2 #> [535,] 25 18 2 #> [536,] 26 18 2 #> [537,] 27 18 2 #> [538,] 28 18 3 #> [539,] 29 18 3 #> [540,] 30 18 3 #> [541,] 1 19 3 #> [542,] 2 19 3 #> [543,] 3 19 3 #> [544,] 4 19 1 #> [545,] 5 19 1 #> [546,] 6 19 1 #> [547,] 7 19 1 #> [548,] 8 19 1 #> [549,] 9 19 3 #> [550,] 10 19 3 #> [551,] 11 19 1 #> [552,] 12 19 1 #> [553,] 13 19 1 #> [554,] 14 19 1 #> [555,] 15 19 3 #> [556,] 16 19 3 #> [557,] 17 19 3 #> [558,] 18 19 3 #> [559,] 19 19 3 #> [560,] 20 19 3 #> [561,] 21 19 1 #> [562,] 22 19 1 #> [563,] 23 19 1 #> [564,] 24 19 2 #> [565,] 25 19 2 #> [566,] 26 19 2 #> [567,] 27 19 2 #> [568,] 28 19 2 #> [569,] 29 19 3 #> [570,] 30 19 3 #> [571,] 1 20 3 #> [572,] 2 20 3 #> [573,] 3 20 3 #> [574,] 4 20 1 #> [575,] 5 20 1 #> [576,] 6 20 1 #> [577,] 7 20 1 #> [578,] 8 20 1 #> [579,] 9 20 1 #> [580,] 10 20 3 #> [581,] 11 20 1 #> [582,] 12 20 1 #> [583,] 13 20 1 #> [584,] 14 20 1 #> [585,] 15 20 3 #> [586,] 16 20 3 #> [587,] 17 20 3 #> [588,] 18 20 3 #> [589,] 19 20 3 #> [590,] 20 20 3 #> [591,] 21 20 3 #> [592,] 22 20 1 #> [593,] 23 20 1 #> [594,] 24 20 2 #> [595,] 25 20 2 #> [596,] 26 20 2 #> [597,] 27 20 2 #> [598,] 28 20 2 #> [599,] 29 20 1 #> [600,] 30 20 3 #> [601,] 1 21 3 #> [602,] 2 21 3 #> [603,] 3 21 1 #> [604,] 4 21 1 #> [605,] 5 21 1 #> [606,] 6 21 1 #> [607,] 7 21 1 #> [608,] 8 21 1 #> [609,] 9 21 1 #> [610,] 10 21 1 #> [611,] 11 21 1 #> [612,] 12 21 3 #> [613,] 13 21 3 #> [614,] 14 21 3 #> [615,] 15 21 3 #> [616,] 16 21 3 #> [617,] 17 21 3 #> [618,] 18 21 3 #> [619,] 19 21 3 #> [620,] 20 21 3 #> [621,] 21 21 3 #> [622,] 22 21 3 #> [623,] 23 21 2 #> [624,] 24 21 2 #> [625,] 25 21 2 #> [626,] 26 21 2 #> [627,] 27 21 2 #> [628,] 28 21 2 #> [629,] 29 21 2 #> [630,] 30 21 1 #> [631,] 1 22 3 #> [632,] 2 22 1 #> [633,] 3 22 1 #> [634,] 4 22 1 #> [635,] 5 22 1 #> [636,] 6 22 1 #> [637,] 7 22 1 #> [638,] 8 22 1 #> [639,] 9 22 1 #> [640,] 10 22 2 #> [641,] 11 22 2 #> [642,] 12 22 2 #> [643,] 13 22 2 #> [644,] 14 22 3 #> [645,] 15 22 3 #> [646,] 16 22 3 #> [647,] 17 22 3 #> [648,] 18 22 3 #> [649,] 19 22 3 #> [650,] 20 22 2 #> [651,] 21 22 2 #> [652,] 22 22 2 #> [653,] 23 22 2 #> [654,] 24 22 2 #> [655,] 25 22 2 #> [656,] 26 22 2 #> [657,] 27 22 2 #> [658,] 28 22 2 #> [659,] 29 22 2 #> [660,] 30 22 1 #> [661,] 1 23 1 #> [662,] 2 23 1 #> [663,] 3 23 1 #> [664,] 4 23 1 #> [665,] 5 23 1 #> [666,] 6 23 1 #> [667,] 7 23 1 #> [668,] 8 23 1 #> [669,] 9 23 1 #> [670,] 10 23 2 #> [671,] 11 23 2 #> [672,] 12 23 2 #> [673,] 13 23 2 #> [674,] 14 23 3 #> [675,] 15 23 3 #> [676,] 16 23 3 #> [677,] 17 23 3 #> [678,] 18 23 3 #> [679,] 19 23 3 #> [680,] 20 23 2 #> [681,] 21 23 3 #> [682,] 22 23 3 #> [683,] 23 23 2 #> [684,] 24 23 2 #> [685,] 25 23 2 #> [686,] 26 23 2 #> [687,] 27 23 2 #> [688,] 28 23 2 #> [689,] 29 23 2 #> [690,] 30 23 2 #> [691,] 1 24 3 #> [692,] 2 24 3 #> [693,] 3 24 1 #> [694,] 4 24 1 #> [695,] 5 24 1 #> [696,] 6 24 3 #> [697,] 7 24 3 #> [698,] 8 24 1 #> [699,] 9 24 2 #> [700,] 10 24 2 #> [701,] 11 24 2 #> [702,] 12 24 2 #> [703,] 13 24 2 #> [704,] 14 24 3 #> [705,] 15 24 3 #> [706,] 16 24 3 #> [707,] 17 24 3 #> [708,] 18 24 3 #> [709,] 19 24 3 #> [710,] 20 24 3 #> [711,] 21 24 3 #> [712,] 22 24 3 #> [713,] 23 24 3 #> [714,] 24 24 2 #> [715,] 25 24 2 #> [716,] 26 24 2 #> [717,] 27 24 2 #> [718,] 28 24 2 #> [719,] 29 24 2 #> [720,] 30 24 2 #> [721,] 1 25 3 #> [722,] 2 25 3 #> [723,] 3 25 1 #> [724,] 4 25 1 #> [725,] 5 25 3 #> [726,] 6 25 3 #> [727,] 7 25 3 #> [728,] 8 25 3 #> [729,] 9 25 2 #> [730,] 10 25 2 #> [731,] 11 25 2 #> [732,] 12 25 2 #> [733,] 13 25 2 #> [734,] 14 25 3 #> [735,] 15 25 3 #> [736,] 16 25 3 #> [737,] 17 25 3 #> [738,] 18 25 3 #> [739,] 19 25 3 #> [740,] 20 25 3 #> [741,] 21 25 3 #> [742,] 22 25 3 #> [743,] 23 25 3 #> [744,] 24 25 2 #> [745,] 25 25 2 #> [746,] 26 25 2 #> [747,] 27 25 2 #> [748,] 28 25 2 #> [749,] 29 25 2 #> [750,] 30 25 2 #> [751,] 1 26 3 #> [752,] 2 26 3 #> [753,] 3 26 3 #> [754,] 4 26 3 #> [755,] 5 26 3 #> [756,] 6 26 3 #> [757,] 7 26 3 #> [758,] 8 26 3 #> [759,] 9 26 2 #> [760,] 10 26 2 #> [761,] 11 26 2 #> [762,] 12 26 2 #> [763,] 13 26 2 #> [764,] 14 26 2 #> [765,] 15 26 3 #> [766,] 16 26 3 #> [767,] 17 26 3 #> [768,] 18 26 3 #> [769,] 19 26 3 #> [770,] 20 26 3 #> [771,] 21 26 3 #> [772,] 22 26 3 #> [773,] 23 26 3 #> [774,] 24 26 2 #> [775,] 25 26 2 #> [776,] 26 26 2 #> [777,] 27 26 2 #> [778,] 28 26 1 #> [779,] 29 26 1 #> [780,] 30 26 3 #> [781,] 1 27 3 #> [782,] 2 27 3 #> [783,] 3 27 3 #> [784,] 4 27 3 #> [785,] 5 27 3 #> [786,] 6 27 3 #> [787,] 7 27 3 #> [788,] 8 27 3 #> [789,] 9 27 2 #> [790,] 10 27 2 #> [791,] 11 27 2 #> [792,] 12 27 2 #> [793,] 13 27 2 #> [794,] 14 27 2 #> [795,] 15 27 3 #> [796,] 16 27 3 #> [797,] 17 27 3 #> [798,] 18 27 3 #> [799,] 19 27 3 #> [800,] 20 27 3 #> [801,] 21 27 3 #> [802,] 22 27 3 #> [803,] 23 27 3 #> [804,] 24 27 2 #> [805,] 25 27 2 #> [806,] 26 27 2 #> [807,] 27 27 1 #> [808,] 28 27 1 #> [809,] 29 27 1 #> [810,] 30 27 3 #> [811,] 1 28 3 #> [812,] 2 28 3 #> [813,] 3 28 3 #> [814,] 4 28 3 #> [815,] 5 28 3 #> [816,] 6 28 3 #> [817,] 7 28 2 #> [818,] 8 28 2 #> [819,] 9 28 2 #> [820,] 10 28 2 #> [821,] 11 28 2 #> [822,] 12 28 2 #> [823,] 13 28 2 #> [824,] 14 28 3 #> [825,] 15 28 3 #> [826,] 16 28 3 #> [827,] 17 28 3 #> [828,] 18 28 3 #> [829,] 19 28 3 #> [830,] 20 28 3 #> [831,] 21 28 3 #> [832,] 22 28 3 #> [833,] 23 28 3 #> [834,] 24 28 2 #> [835,] 25 28 2 #> [836,] 26 28 3 #> [837,] 27 28 3 #> [838,] 28 28 3 #> [839,] 29 28 3 #> [840,] 30 28 3 #> [841,] 1 29 3 #> [842,] 2 29 3 #> [843,] 3 29 3 #> [844,] 4 29 3 #> [845,] 5 29 2 #> [846,] 6 29 2 #> [847,] 7 29 2 #> [848,] 8 29 2 #> [849,] 9 29 2 #> [850,] 10 29 2 #> [851,] 11 29 2 #> [852,] 12 29 2 #> [853,] 13 29 2 #> [854,] 14 29 3 #> [855,] 15 29 3 #> [856,] 16 29 3 #> [857,] 17 29 3 #> [858,] 18 29 3 #> [859,] 19 29 3 #> [860,] 20 29 3 #> [861,] 21 29 3 #> [862,] 22 29 3 #> [863,] 23 29 3 #> [864,] 24 29 2 #> [865,] 25 29 3 #> [866,] 26 29 3 #> [867,] 27 29 3 #> [868,] 28 29 2 #> [869,] 29 29 2 #> [870,] 30 29 2 #> [871,] 1 30 3 #> [872,] 2 30 3 #> [873,] 3 30 3 #> [874,] 4 30 3 #> [875,] 5 30 2 #> [876,] 6 30 2 #> [877,] 7 30 2 #> [878,] 8 30 2 #> [879,] 9 30 2 #> [880,] 10 30 2 #> [881,] 11 30 2 #> [882,] 12 30 2 #> [883,] 13 30 2 #> [884,] 14 30 3 #> [885,] 15 30 3 #> [886,] 16 30 3 #> [887,] 17 30 3 #> [888,] 18 30 3 #> [889,] 19 30 2 #> [890,] 20 30 2 #> [891,] 21 30 2 #> [892,] 22 30 3 #> [893,] 23 30 3 #> [894,] 24 30 2 #> [895,] 25 30 3 #> [896,] 26 30 3 #> [897,] 27 30 3 #> [898,] 28 30 2 #> [899,] 29 30 2 #> [900,] 30 30 2"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_unique_values.html","id":null,"dir":"Reference","previous_headings":"","what":"get_unique_values — get_unique_values","title":"get_unique_values — get_unique_values","text":"function returns unique values object.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_unique_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get_unique_values — get_unique_values","text":"","code":"get_unique_values(x, simplify = FALSE, verbose = TRUE)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_unique_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get_unique_values — get_unique_values","text":"x Vector, matrix, raster, stars, terra object list previous. simplify true, vector returned instead list 1-dimensional input verbose true, warning messages printed","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_unique_values.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"get_unique_values — get_unique_values","text":"Fast memory friendly Rcpp implementation find unique values object.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/get_unique_values.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"get_unique_values — get_unique_values","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) get_unique_values(landscape) #> Warning: Double values will be converted to integer. #> $layer_1 #> [1] 1 2 3 #> landscape_stack <- c(landscape, landscape, landscape) get_unique_values(landscape_stack) #> Warning: Double values will be converted to integer. #> Warning: Double values will be converted to integer. #> Warning: Double values will be converted to integer. #> $layer_1 #> [1] 1 2 3 #> #> $layer_2 #> [1] 1 2 3 #> #> $layer_3 #> [1] 1 2 3 #> landscape_matrix <- terra::as.matrix(landscape, wide = TRUE) get_unique_values(landscape_matrix) #> Warning: Double values will be converted to integer. #> $layer_1 #> [1] 1 2 3 #> x_vec <- c(1, 2, 1, 1, 2, 2) get_unique_values(x_vec) #> Warning: Double values will be converted to integer. #> $layer_1 #> [1] 1 2 #> landscape_list <- list(landscape, landscape_matrix, x_vec) get_unique_values(landscape_list) #> Warning: Double values will be converted to integer. #> Warning: Double values will be converted to integer. #> Warning: Double values will be converted to integer. #> $layer_1 #> [1] 1 2 3 #> #> $layer_2 #> [1] 1 2 3 #> #> $layer_3 #> [1] 1 2 #>"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape.html","id":null,"dir":"Reference","previous_headings":"","what":"Example map (random cluster neutral landscape model). — landscape","title":"Example map (random cluster neutral landscape model). — landscape","text":"example map show landscapemetrics functionality generated nlm_randomcluster() algorithm.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example map (random cluster neutral landscape model). — landscape","text":"","code":"landscape"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example map (random cluster neutral landscape model). — landscape","text":"raster object.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example map (random cluster neutral landscape model). — landscape","text":"Simulated neutral landscape model R. https://github.com/ropensci/NLMR/","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape_as_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Landscape as list — landscape_as_list","title":"Landscape as list — landscape_as_list","text":"Convert raster input list","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape_as_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Landscape as list — landscape_as_list","text":"","code":"landscape_as_list(landscape) # S3 method for SpatRaster landscape_as_list(landscape) # S3 method for RasterLayer landscape_as_list(landscape) # S3 method for RasterBrick landscape_as_list(landscape) # S3 method for RasterStack landscape_as_list(landscape) # S3 method for stars landscape_as_list(landscape) # S3 method for list landscape_as_list(landscape) # S3 method for matrix landscape_as_list(landscape) # S3 method for numeric landscape_as_list(landscape)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape_as_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Landscape as list — landscape_as_list","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape_as_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Landscape as list — landscape_as_list","text":"list","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape_as_list.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Landscape as list — landscape_as_list","text":"Mainly internal use","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscape_as_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Landscape as list — landscape_as_list","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) landscape_as_list(c(landscape, landscape)) #> [[1]] #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : clumps #> min value : 1 #> max value : 3 #> #> [[2]] #> class : SpatRaster #> dimensions : 30, 30, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 30, 0, 30 (xmin, xmax, ymin, ymax) #> coord. ref. : #> source(s) : memory #> name : clumps #> min value : 1 #> max value : 3 #>"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscapemetrics.html","id":null,"dir":"Reference","previous_headings":"","what":"landscapemetrics — landscapemetrics","title":"landscapemetrics — landscapemetrics","text":"Calculates landscape metrics categorical landscape patterns tidy workflow. 'landscapemetrics' reimplements common metrics 'FRAGSTATS' (https://www.fragstats.org/) adds new ones current literature landscape metrics. package supports 'terra' SpatRaster objects input arguments. provides utility functions visualize patches, select metrics building blocks develop new metrics.","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/landscapemetrics.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"landscapemetrics — landscapemetrics","text":"Maintainer: Maximilian H.K. Hesselbarth mhk.hesselbarth@gmail.com (ORCID) Authors: Marco Sciaini sciaini.marco@gmail.com (ORCID) Jakub Nowosad nowosad.jakub@gmail.com (ORCID) Sebastian Hanss (ORCID) contributors: Laura J. Graham (Input package structure) [contributor] Jeffrey Hollister (Input package structure) [contributor] Kimberly . (Input package structure) [contributor] Florian Privé (Original author underlying C++ code get_nearestneighbour() function) [contributor] Project Nayuki (Original author underlying C++ code get_circumscribingcircle lsm_p_circle) [contributor] Matt Strimas-Mackey (Bugfix sample_metrics()) [contributor]","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":null,"dir":"Reference","previous_headings":"","what":"List landscape metrics — list_lsm","title":"List landscape metrics — list_lsm","text":"List landscape metrics","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List landscape metrics — list_lsm","text":"","code":"list_lsm( level = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, simplify = FALSE, verbose = TRUE )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List landscape metrics — list_lsm","text":"level Level metrics. Either 'patch', 'class' 'landscape' (vector combination). metric Abbreviation metrics (e.g. 'area'). name Full name metrics (e.g. 'core area') type Type according FRAGSTATS grouping (e.g. 'aggregation metrics'). Selected level metrics: either \"patch\", \"class\" \"landscape\". also possible specify functions vector strings, e.g. = c(\"lsm_c_ca\", \"lsm_l_ta\"). simplify true, function names returned vector. verbose Print warning messages","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List landscape metrics — list_lsm","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"List landscape metrics — list_lsm","text":"List available landscape metrics depending provided filter arguments. argument provided, automatically possibilities selected. Therefore, get available metrics, use simply list_lsm(). arguments exception argument, also possible use negative subset, .e. metrics selected ones. Therefore, simply use e.g. level = \"-patch\". Furthermore, possible get vector function names instead full tibble.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"List landscape metrics — list_lsm","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/list_lsm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List landscape metrics — list_lsm","text":"","code":"list_lsm(level = c(\"patch\", \"landscape\"), type = \"aggregation metric\") #> # A tibble: 15 × 5 #> metric name type level function_name #> #> 1 enn euclidean nearest neighbor distance aggregati… patch lsm_p_enn #> 2 ai aggregation index aggregati… land… lsm_l_ai #> 3 cohesion patch cohesion index aggregati… land… lsm_l_cohesi… #> 4 contag connectance aggregati… land… lsm_l_contag #> 5 division division index aggregati… land… lsm_l_divisi… #> 6 enn_cv euclidean nearest neighbor distance aggregati… land… lsm_l_enn_cv #> 7 enn_mn euclidean nearest neighbor distance aggregati… land… lsm_l_enn_mn #> 8 enn_sd euclidean nearest neighbor distance aggregati… land… lsm_l_enn_sd #> 9 iji interspersion and juxtaposition index aggregati… land… lsm_l_iji #> 10 lsi landscape shape index aggregati… land… lsm_l_lsi #> 11 mesh effective mesh size aggregati… land… lsm_l_mesh #> 12 np number of patches aggregati… land… lsm_l_np #> 13 pd patch density aggregati… land… lsm_l_pd #> 14 pladj percentage of like adjacencies aggregati… land… lsm_l_pladj #> 15 split splitting index aggregati… land… lsm_l_split list_lsm(level = \"-patch\", type = \"area and edge metric\") #> # A tibble: 21 × 5 #> metric name type level function_name #> #> 1 area_cv patch area area and edge metric class lsm_c_area_cv #> 2 area_mn patch area area and edge metric class lsm_c_area_mn #> 3 area_sd patch area area and edge metric class lsm_c_area_sd #> 4 ca total (class) area area and edge metric class lsm_c_ca #> 5 ed edge density area and edge metric class lsm_c_ed #> 6 gyrate_cv radius of gyration area and edge metric class lsm_c_gyrate_cv #> 7 gyrate_mn radius of gyration area and edge metric class lsm_c_gyrate_mn #> 8 gyrate_sd radius of gyration area and edge metric class lsm_c_gyrate_sd #> 9 lpi largest patch index area and edge metric class lsm_c_lpi #> 10 pland percentage of landscape area and edge metric class lsm_c_pland #> # ℹ 11 more rows list_lsm(metric = \"area\", simplify = TRUE) #> [1] \"lsm_p_area\" \"lsm_c_area_cv\" \"lsm_c_area_mn\" \"lsm_c_area_sd\" #> [5] \"lsm_l_area_cv\" \"lsm_l_area_mn\" \"lsm_l_area_sd\" list_lsm(metric = \"area\", what = \"lsm_p_shape\") #> Warning: Only using 'what' argument. #> # A tibble: 1 × 5 #> metric name type level function_name #> #> 1 shape shape index shape metric patch lsm_p_shape list_lsm(metric = \"area\", what = c(\"patch\", \"lsm_l_ta\")) #> Warning: Only using 'what' argument. #> # A tibble: 13 × 5 #> metric name type level function_name #> #> 1 area patch area area and edge… patch lsm_p_area #> 2 cai core area index core area met… patch lsm_p_cai #> 3 circle related circumscribing circle shape metric patch lsm_p_circle #> 4 contig contiguity index shape metric patch lsm_p_contig #> 5 core core area core area met… patch lsm_p_core #> 6 enn euclidean nearest neighbor distance aggregation m… patch lsm_p_enn #> 7 frac fractal dimension index shape metric patch lsm_p_frac #> 8 gyrate radius of gyration area and edge… patch lsm_p_gyrate #> 9 ncore number of core areas core area met… patch lsm_p_ncore #> 10 para perimeter-area ratio shape metric patch lsm_p_para #> 11 perim patch perimeter area and edge… patch lsm_p_perim #> 12 shape shape index shape metric patch lsm_p_shape #> 13 ta total area area and edge… land… lsm_l_ta list_lsm(what = c(\"lsm_c_tca\", \"lsm_l_ta\")) #> # A tibble: 2 × 5 #> metric name type level function_name #> #> 1 tca total core area core area metric class lsm_c_tca #> 2 ta total area area and edge metric landscape lsm_l_ta"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_abbreviations_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Tibble of abbreviations coming from FRAGSTATS — lsm_abbreviations_names","title":"Tibble of abbreviations coming from FRAGSTATS — lsm_abbreviations_names","text":"single tibble every abbreviation every metric reimplemented landscapemetrics corresponding full name literature.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_abbreviations_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tibble of abbreviations coming from FRAGSTATS — lsm_abbreviations_names","text":"","code":"lsm_abbreviations_names"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_abbreviations_names.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Tibble of abbreviations coming from FRAGSTATS — lsm_abbreviations_names","text":"tibble object.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_abbreviations_names.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tibble of abbreviations coming from FRAGSTATS — lsm_abbreviations_names","text":"Can used calculating metric(s) join readable results tibble visualizing results.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_abbreviations_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tibble of abbreviations coming from FRAGSTATS — lsm_abbreviations_names","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) patch_area <- lsm_p_area(landscape) patch_area <- merge(x = patch_area, y = lsm_abbreviations_names, by = c(\"level\", \"metric\"))"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":null,"dir":"Reference","previous_headings":"","what":"AI (class level) — lsm_c_ai","title":"AI (class level) — lsm_c_ai","text":"Aggregation index (Aggregation metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"AI (class level) — lsm_c_ai","text":"","code":"lsm_c_ai(landscape)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"AI (class level) — lsm_c_ai","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"AI (class level) — lsm_c_ai","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"AI (class level) — lsm_c_ai","text":"$$AI = \\Bigg[\\frac{g_{ii}}{max-g_{ii}} \\Bigg](100) $$ \\(g_{ii}\\) number like adjacencies based single-count method \\(max-g_{ii}\\) classwise maximum number like adjacencies class . AI 'Aggregation metric'. equals number like adjacencies divided theoretical maximum possible number like adjacencies class. metric based adjacency matrix single-count method.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"AI (class level) — lsm_c_ai","text":"Percent","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"AI (class level) — lsm_c_ai","text":"0 <= AI <= 100","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"AI (class level) — lsm_c_ai","text":"Equals 0 maximally disaggregated 100 maximally aggregated classes.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"AI (class level) — lsm_c_ai","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org , H. S., DeZonia, B. E., & Mladenoff, D. J. 2000. aggregation index (AI) quantify spatial patterns landscapes. Landscape ecology, 15(7), 591-601.","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ai.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"AI (class level) — lsm_c_ai","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ai(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA ai 79.7 #> 2 1 class 2 NA ai 79.6 #> 3 1 class 3 NA ai 84.9"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":null,"dir":"Reference","previous_headings":"","what":"AREA_CV (class level) — lsm_c_area_cv","title":"AREA_CV (class level) — lsm_c_area_cv","text":"Coefficient variation patch area (Area edge metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"AREA_CV (class level) — lsm_c_area_cv","text":"","code":"lsm_c_area_cv(landscape, directions = 8)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"AREA_CV (class level) — lsm_c_area_cv","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters directions number directions patches connected: 4 (rook's case) 8 (queen's case).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"AREA_CV (class level) — lsm_c_area_cv","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"AREA_CV (class level) — lsm_c_area_cv","text":"$$AREA_{CV} = cv(AREA[patch_{ij}])$$ \\(AREA[patch_{ij}]\\) area patch hectares. AREA_CV 'Area Edge metric'. metric summarises class Coefficient variation patch areas belonging class . metric describes differences among patches class landscape easily comparable scaled mean. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"AREA_CV (class level) — lsm_c_area_cv","text":"Hectares","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"AREA_CV (class level) — lsm_c_area_cv","text":"AREA_CV >= 0","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"AREA_CV (class level) — lsm_c_area_cv","text":"Equals AREA_CV = 0 patches identical size. Increases, without limit, variation patch areas increases.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"AREA_CV (class level) — lsm_c_area_cv","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_cv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"AREA_CV (class level) — lsm_c_area_cv","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_cv(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA area_cv 156. #> 2 1 class 2 NA area_cv 130. #> 3 1 class 3 NA area_cv 84.6"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":null,"dir":"Reference","previous_headings":"","what":"AREA_MN (class level) — lsm_c_area_mn","title":"AREA_MN (class level) — lsm_c_area_mn","text":"Mean patch area (Area edge metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"AREA_MN (class level) — lsm_c_area_mn","text":"","code":"lsm_c_area_mn(landscape, directions = 8)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"AREA_MN (class level) — lsm_c_area_mn","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters directions number directions patches connected: 4 (rook's case) 8 (queen's case).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"AREA_MN (class level) — lsm_c_area_mn","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"AREA_MN (class level) — lsm_c_area_mn","text":"$$AREA_{MN} = mean(AREA[patch_{ij}])$$ \\(AREA[patch_{ij}]\\) area patch hectares AREA_MN 'Area Edge metric'. metric summarises class mean patch areas belonging class . metric simple way describe composition landscape. Especially together total class area (lsm_c_ca), can also give idea patch structure (e.g. many small patches vs. larges patches). metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"AREA_MN (class level) — lsm_c_area_mn","text":"Hectares","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"AREA_MN (class level) — lsm_c_area_mn","text":"AREA_MN > 0","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"AREA_MN (class level) — lsm_c_area_mn","text":"Approaches AREA_MN = 0 patches small. Increases, without limit, patch areas increase.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"AREA_MN (class level) — lsm_c_area_mn","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_mn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"AREA_MN (class level) — lsm_c_area_mn","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_mn(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA area_mn 0.00204 #> 2 1 class 2 NA area_mn 0.0018 #> 3 1 class 3 NA area_mn 0.00803"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":null,"dir":"Reference","previous_headings":"","what":"AREA_SD (class level) — lsm_c_area_sd","title":"AREA_SD (class level) — lsm_c_area_sd","text":"Standard deviation patch area (Area edge metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"AREA_SD (class level) — lsm_c_area_sd","text":"","code":"lsm_c_area_sd(landscape, directions = 8)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"AREA_SD (class level) — lsm_c_area_sd","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters directions number directions patches connected: 4 (rook's case) 8 (queen's case).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"AREA_SD (class level) — lsm_c_area_sd","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"AREA_SD (class level) — lsm_c_area_sd","text":"$$AREA_{SD} = sd(AREA[patch_{ij}])$$ \\(AREA[patch_{ij}]\\) area patch hectares. AREA_SD 'Area Edge metric'. metric summarises class standard deviation patch areas belonging class . metric describes differences among patches class landscape. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"AREA_SD (class level) — lsm_c_area_sd","text":"Hectares","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"AREA_SD (class level) — lsm_c_area_sd","text":"AREA_SD >= 0","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"AREA_SD (class level) — lsm_c_area_sd","text":"Equals AREA_SD = 0 patches identical size. Increases, without limit, variation patch areas increases.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"AREA_SD (class level) — lsm_c_area_sd","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_area_sd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"AREA_SD (class level) — lsm_c_area_sd","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_sd(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA area_sd 0.00319 #> 2 1 class 2 NA area_sd 0.00233 #> 3 1 class 3 NA area_sd 0.00679"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":null,"dir":"Reference","previous_headings":"","what":"CA (class level) — lsm_c_ca","title":"CA (class level) — lsm_c_ca","text":"Total (class) area (Area edge metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CA (class level) — lsm_c_ca","text":"","code":"lsm_c_ca(landscape, directions = 8)"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CA (class level) — lsm_c_ca","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. directions number directions patches connected: 4 (rook's case) 8 (queen's case).","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CA (class level) — lsm_c_ca","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"CA (class level) — lsm_c_ca","text":"$$CA = sum(AREA[patch_{ij}])$$ \\(AREA[patch_{ij}]\\) area patch hectares. CA 'Area edge metric' measure composition. total (class) area sums area patches belonging class . shows landscape e.g. dominated one class classes equally present. CA absolute measure, making comparisons among landscapes different total areas difficult. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"CA (class level) — lsm_c_ca","text":"Hectares","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"CA (class level) — lsm_c_ca","text":"CA > 0","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"CA (class level) — lsm_c_ca","text":"Approaches CA > 0 patch areas class become small. Increases, without limit, patch areas class become large. CA = TA one class present.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"CA (class level) — lsm_c_ca","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_ca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CA (class level) — lsm_c_ca","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ca(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA ca 0.0184 #> 2 1 class 2 NA ca 0.0234 #> 3 1 class 3 NA ca 0.0482"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":null,"dir":"Reference","previous_headings":"","what":"CAI_CV (class level) — lsm_c_cai_cv","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"Coefficient variation core area index (Core area metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"","code":"lsm_c_cai_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. directions number directions patches connected: 4 (rook's case) 8 (queen's case). consider_boundary Logical cells neighbour landscape boundary considered core edge_depth Distance (cells) cell away patch edge considered core cell","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"$$CAI_{CV} = cv(CAI[patch_{ij}]$$ \\(CAI[patch_{ij}]\\) core area index patch. CAI_CV 'Core area metric'. metric summarises class Coefficient variation core area index patches belonging class . core area index percentage core area relation patch area. cell defined core area cell neighbour different value (rook's case). metric describes differences among patches class landscape. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"Percent","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"CAI_CV >= 0","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"Equals CAI_CV = 0 core area index identical patches. Increases, without limit, variation core area indices increases.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_cv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CAI_CV (class level) — lsm_c_cai_cv","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_cv(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA cai_cv 164. #> 2 1 class 2 NA cai_cv 143. #> 3 1 class 3 NA cai_cv 72.1"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":null,"dir":"Reference","previous_headings":"","what":"CAI_MN (class level) — lsm_c_cai_mn","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"Mean core area index (Core area metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"","code":"lsm_c_cai_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. directions number directions patches connected: 4 (rook's case) 8 (queen's case). consider_boundary Logical cells neighbour landscape boundary considered core edge_depth Distance (cells) cell away patch edge considered core cell","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"$$CAI_{MN} = mean(CAI[patch_{ij}]$$ \\(CAI[patch_{ij}]\\) core area index patch. CAI_MN 'Core area metric'. metric summarises class mean core area index patches belonging class . core area index percentage core area relation patch area. cell defined core area cell neighbour different value (rook's case). metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"Percent","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"0 <= CAI_MN <= 100","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"CAI_MN = 0 patches core area approaches CAI_MN = 100 increasing percentage core area within patches.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_mn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CAI_MN (class level) — lsm_c_cai_mn","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_mn(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #> #> 1 1 class 1 NA cai_mn 12.8 #> 2 1 class 2 NA cai_mn 14.1 #> 3 1 class 3 NA cai_mn 33.3"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":null,"dir":"Reference","previous_headings":"","what":"CAI_SD (class level) — lsm_c_cai_sd","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"Standard deviation core area index (Core area metric)","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"","code":"lsm_c_cai_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )"},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"landscape categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars list SpatRasters. directions number directions patches connected: 4 (rook's case) 8 (queen's case). consider_boundary Logical cells neighbour landscape boundary considered core edge_depth Distance (cells) cell away patch edge considered core cell","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"tibble","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"$$CAI_{SD} = sd(CAI[patch_{ij}]$$ \\(CAI[patch_{ij}]\\) core area index patch. CAI_SD 'Core area metric'. metric summarises class standard deviation core area index patches belonging class . core area index percentage core area relation patch area. cell defined core area cell neighbour different value (rook's case). metric describes differences among patches class landscape. metric based distances areas please make sure data valid using check_landscape.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"units","dir":"Reference","previous_headings":"","what":"Units","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"Percent","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"range","dir":"Reference","previous_headings":"","what":"Range","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"CAI_SD >= 0","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"behaviour","dir":"Reference","previous_headings":"","what":"Behaviour","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"Equals CAI_SD = 0 core area index identical patches. Increases, without limit, variation core area indices increases.","code":""},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"McGarigal K., SA Cushman, E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program Categorical Maps. Computer software program produced authors; available following web site: https://www.fragstats.org","code":""},{"path":[]},{"path":"https://r-spatialecology.github.io/landscapemetrics/reference/lsm_c_cai_sd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CAI_SD (class level) — lsm_c_cai_sd","text":"","code":"landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_sd(landscape) #> # A tibble: 3 × 6 #> layer level class id metric value #>