mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
major overhaul with new functions. docs are lacking
This commit is contained in:
parent
1fd3911974
commit
04f5bec85c
28 changed files with 874 additions and 81 deletions
31
man/case_match_regex_list.Rd
Normal file
31
man/case_match_regex_list.Rd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/doc2dd.R
|
||||
\name{case_match_regex_list}
|
||||
\alias{case_match_regex_list}
|
||||
\title{List-base regex case_when}
|
||||
\usage{
|
||||
case_match_regex_list(data, match.list, .default = NA)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{vector}
|
||||
|
||||
\item{match.list}{list of case matches}
|
||||
|
||||
\item{.default}{Default value for non-matches. Default is NA.}
|
||||
}
|
||||
\value{
|
||||
vector
|
||||
}
|
||||
\description{
|
||||
Mimics case_when for list of regex patterns and values. Used for date/time
|
||||
validation generation from name vector. Like case_when, the matches are in
|
||||
order of priority.
|
||||
Primarily used in REDCapCAST to do data type coding from systematic variable
|
||||
naming.
|
||||
}
|
||||
\examples{
|
||||
case_match_regex_list(
|
||||
c("test_date", "test_time", "test_tida", "test_tid"),
|
||||
list(date_dmy = "_dat[eo]$", time_hh_mm_ss = "_ti[md]e?$")
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue