new internal helpers

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-02-06 14:16:20 +01:00
parent 02b9c7ffe7
commit 729d3aca13
2 changed files with 45 additions and 0 deletions

17
man/get_id_name.Rd Normal file
View File

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.r
\name{get_id_name}
\alias{get_id_name}
\title{Get the id name}
\usage{
get_id_name(data)
}
\arguments{
\item{data}{data frame or list}
}
\value{
character vector
}
\description{
Get the id name
}

View File

@ -0,0 +1,28 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.r
\name{is.repeated_longitudinal}
\alias{is.repeated_longitudinal}
\title{Test if repeatable or longitudinal}
\usage{
is.repeated_longitudinal(
data,
generics = c("redcap_event_name", "redcap_repeat_instrument", "redcap_repeat_instance")
)
}
\arguments{
\item{data}{data set}
\item{generics}{default is "redcap_event_name", "redcap_repeat_instrument"
and "redcap_repeat_instance"}
}
\value{
logical
}
\description{
Test if repeatable or longitudinal
}
\examples{
is.repeated_longitudinal(c("record_id", "age", "record_id", "gender"))
is.repeated_longitudinal(redcapcast_data)
is.repeated_longitudinal(list(redcapcast_data))
}