cllr_add_id: Add id column

View source: R/cllr_add_id.R

cllr_add_idR Documentation

Add id column

Description

If your data does not have unique identifiers for each animal cllr_add_id will create that column and insert values you provide.

Usage

cllr_add_id(x, id_vals)

Arguments

x

object inherting from data.frame

id_vals

values (character) to include in a newly created id column, these are the unique identifier for each individual

Details

When adding a new column to data using cllr_add_id the user should supply either a length 1 character string or a character vector equal in length to the number of observations in the data. The latter is not recommended.

Value

data.frame

See Also

cllr_rename_id

Examples

# Add unique identifiers
df <- data.frame(val = 1:3)
cllr_add_id(df, "1A")

Huh/collar documentation built on Aug. 5, 2022, 11:02 p.m.