README.md

Bakawans Under Constrained Survey (bucs) package

Description

This package was initially created for rapid resource assessment of mangrove stands across different locations.

It contain functions to read an excel file with information (requires information such as location, site names, plot numbers, plot sizes, and diameter at breast height(dbh)) spread across multiple tabs.

It can compute for diversity indices, compute for importance values, compute for frequency distribution, and process saplings-wildlings data (included in the excel file).

Included also are functions for data visualization similar with those submitted to the reports.

Guides

There is a repository named "guide" that contains useful files that will serve as, well guides, as how to use the package. It is recommended to download these files and have a look at them.

An R file named "fordataanalysis.R". It is a backbone script on how to use the functions of this package.

Provided also is a datatrial.xslx, an excel file with dummy data that was created to test this package.

Along with the script and sample data is a .pdf file named "guide.pdf". A more comprehensive step-by-step guide (I hope) than the script, made with visuals and results using the sample data stored in "datatrial.xslx". It was made in R Markdown using the code from "fordataanalysis.R".

Installation

Using devtools to install

Type the following into R

install.packages('devtools')
devtools::install_github('ppcadelina/bucs')

You may skip the first line if you already have devtools installed.

Functions overview

data_prep()

This function reads a single excel file with multiple tabs containing necessary information such as location (of various levels such as region, province, municipalities), site (code and names), plot number or tag, plot area, species and measurement of its diameter at breast height (dbh). Outputs a consolidated data frame.

data_sum()

This function will output multiple data frames with summary characteristics for the following: location information (number of sites, number of plots, total plot areas, and species observed), species observed information (number of individuals observed and frequencies from plots), tree measurement statistics (dbh, height if available, and basal areas), and data on stand basal areas and stem densities.

compute_DIV()

This function will compute for the following diversity indices: Shannon species diversity, Simpson species diversity, Pielou species evenness, and Margalef species richness.

plot_DIV()

An optional function that can create the same boxplot for diversity indices as intended for the report.

compute_IVI()

This function will compute for the following: relative density, relative frequency, relative dominance, and importance value index for each species.

plot_IVI()

An optional function that can create the same horizontal stacked bar graph for diversity indices as intended for the report.

data_sapwld()

This function allows to read an excel file with tabs containing number of observed saplings and wildings using plot-method survey. Format of the worksheet(s) should be: 1. First column containing Tags or Codes for Site/Location, 2. Second column are names/numbers of plots 3. First row containing labels for species while 4. Rest of the body should contain the observed number of the species per plot

mdfrq()

This function will create a frequency table based on the given ranges by the user for diameter at breast height measurements. Included in this function also is the output for a histogram that will visualize the result similar to the one submitted for the report.

MIT License

Copyright (c) [2020] [Patrick Lawrence P CadeliƱa]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This work is published from the Philippines.

Author's personal note

Special thanks MB-RRA Mangrove Team 2020: Ben, Maida, Green, and Boss for an awesome learning adventure.

Special thanks also to bruh Kent for checking and debugging this code with me.



ppcadelina/bucs documentation built on April 4, 2020, 5:52 a.m.