qc_email_check: Check if provided email directions are correct

View source: R/qc_md_general_checks.R

qc_email_checkR Documentation

Check if provided email directions are correct

Description

qc_email_check function checks for correctness in the email fields

Usage

qc_email_check(data, parent_logger = "test")

Arguments

data

Data frame containing the site metadata where email variables are located.

Details

Provided email direction/s (contact and additional contributor, if any) are checked to ensure that are valid email directions. This function uses stringr package utilities for character string tinkering and regex to match the characteristics of email directions

Value

A data frame with the directions and the result of the check

Regex

Email directions can be divided in three components, username, @ and domain. username component can contain any letter, number, underscores, dots and hyphens. domain component can be also any letter, number, underscores dots and hyphens, followed by a dot and from two to six letters and/or dots. So, the regex expression to match a email direction is as follows: "^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$"


vflo/PSIsapfluxnetQC1 documentation built on Feb. 15, 2024, 3:19 a.m.