Learn R Programming

monographaR (version 1.0)

collectorList: Generates a collector list

Description

This function will generate a txt file with a collector list for all species in data.

Usage

collectorList(data = data, filename = "collector_list.txt", 
paragraphs = TRUE)

Arguments

data
data.frame
filename
character
paragraphs
logical

Value

  • Exports a txt file.

Details

It requires a data.frame with five columns, ordered as species, collector name, collector number, herbarium acronym and herbarium number. Herbarium columns are only used if any collector number is missing (NA). Thus, if there is no missing values in collector number, then the herbarium columns might be empty.

Examples

Run this code
## loading the example data

data(monographaR_examples)
monographaR_examples$collectorList -> data
head(data)

## running the function, it will print in the terminal the output. 
## To export a txt, place a ## name in the filename argument
## (i.e., filename = "myoutput.txt")

collectorList(data, filename = "", paragraphs = TRUE)

## or a second option

collectorList(data, filename = "", paragraphs = FALSE)

Run the code above in your browser using DataLab