Skip to contents

A function to adjoin the year from the item status date to the collection database.

Usage

add_status_year(collection, item_status_date_column = "ItemStatusDate")

Arguments

collection

A data frame containing a collection.

item_status_date_column

The name of the column containing the item status date.

Value

The collection data frame with status_year adjoined.

Examples

taxon_names = c('Trigonella afghanica', 'Eupatorium magdalenae')
item_status = c('2021-04-12', '12th August 1991')
collection = data.frame(name = taxon_names, item_status = item_status)
add_status_year(collection, item_status_date_column ='item_status')
#>                    name      item_status status_year
#> 1  Trigonella afghanica       2021-04-12        2021
#> 2 Eupatorium magdalenae 12th August 1991        1991