parse_receiver_col: Parse default-formatted Vemco Receiver column into two...

Description Usage Arguments Details Value Author(s) Examples

View source: R/parsing_functions.R

Description

separates the default Vemco column formatting of VR2W-RecSN, then just keeps the ReceiverSN as a new column

Usage

1
parse_receiver_col(df, reccol = "Receiver")

Arguments

df

dataframe with a ‘Receiver' column that is formatted as ’VRX-ReceiverSN' (i.e., must be delimited by hyphens)

reccol

the name of the receiver column you wish to parse; defaults to "Receiver"

Details

This function will not work on a column delimited by more than one hyphen

Value

A dataframe with the 'Receiver' column at the end, with the 'VRX' info and hyphen removed.

Author(s)

Myfanwy Johnston

Examples

1
2
3
4
df <- structure(list(TagID = c("A69-1206-112", "A69-1206-152", "A69-1206-1908"
), Monitor = c("VR2W-106683", "VR2W-106683", "VR2W-106683"),
    Detections = c(1L, 1L, 1L)), row.names = c(NA, 3L), class = "data.frame")
parse_receiver_col(df, "Monitor")

fishsciences/ybt documentation built on March 11, 2021, 8:45 a.m.