Learn R Programming

ethnobotanyR (version 0.2.0)

URsum: Sum of all Use Reports (UR) for all species

Description

Calculates the sum of all ethnobotany use reports (UR) for all species, a common metric for ethnobotany studies.

Usage

URsum(data)

Arguments

Value

Single value sum of all ethnobotany use reports (UR) for all species in the data.

References

Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Conservation in Amazonia.” Conservation Biology 1 (4): 296–310.

Examples

Run this code

#Use built-in ethnobotany data example
URsum(ethnobotanydata)

#Generate random dataset of three informants uses for four species

eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE)))
names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_")  
eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE)
eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE)

URsum(eb_data)

Run the code above in your browser using DataLab