knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

qeb99r

qeb99r stands for quantitative ethnobotany 1999 in R. The goal of the qeb99r is to provide a central package which implements the methods outlined in:

Höft, M., Barik, S. K., & Lykke, A. M. (1999). Quantitative Ethnobotany: Applications of Multivariate and Statistical Analyses in Ethnobotany.

Installation

You can install development version from GitHub with:

# install.packages("devtools")
devtools::install_github("mncube/qeb99r")

Density of species

The dsp function can be used to compute the density of species (Dsp) on a data frame that includes the names of the species and the distance from the random sampling points to the distance to the nearest individual of the species:

library(qeb99r)

#Create a data frame of species and distances
df_sp <- data.frame(spec = sample(c("sp1", "sp2", "sp3"), 100, replace = TRUE),
                    dis = rnorm(100, 100, 25))

#Compute the Dsp for each species
df_sp_dens <- dsp(data = df_sp, species = spec, distance = dis)

#Display results
head(df_sp_dens)

The dsp function can also be used to compute the dsp on a numeric vector of distances for one species

vec_sp <- rnorm(33, 100, 25)
dsp(distance = vec_sp)


mncube/qeb99r documentation built on Dec. 21, 2021, 8:07 p.m.