check_problems: Check for and correct odd animal ids

View source: R/housekeeping.R

check_problemsR Documentation

Check for and correct odd animal ids

Description

This function compares the animal ids in your data file to those in a problem index file. Any ids matched will be replaced with the corrected value in the problem index.

Usage

check_problems(r, problems)

Arguments

r

Data frame. A data frame of read data, with at least column animal_id.

problems

Character or Data frame. Either the name and location of a .csv file containing the problem index or a data frame of the problem index. In either case, the data must contain two columns: original_id and corrected_id.

Details

This is useful for correcting ids that have been mangled by opening files in Word (where leading zeros are stripped) or for dealing with any odd problems in the field.

Value

A data frame with corrected ids. Messages are printed to inform the user of any corrections made.


steffilazerte/feedr documentation built on Jan. 27, 2023, 3:46 a.m.