mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-22 21:40:23 +01:00
28 lines
542 B
Plaintext
28 lines
542 B
Plaintext
|
% Generated by roxygen2: do not edit by hand
|
||
|
% Please edit documentation in R/ds2dd_detailed.R
|
||
|
\name{get_attr}
|
||
|
\alias{get_attr}
|
||
|
\title{Extract attribute. Returns NA if none}
|
||
|
\usage{
|
||
|
get_attr(data, attr = NULL)
|
||
|
}
|
||
|
\arguments{
|
||
|
\item{data}{vector}
|
||
|
|
||
|
\item{attr}{attribute name}
|
||
|
}
|
||
|
\value{
|
||
|
character vector
|
||
|
}
|
||
|
\description{
|
||
|
Extract attribute. Returns NA if none
|
||
|
}
|
||
|
\examples{
|
||
|
attr(mtcars$mpg, "label") <- "testing"
|
||
|
sapply(mtcars, get_attr)
|
||
|
lapply(mtcars, \(.x)get_attr(.x, NULL))
|
||
|
mtcars |>
|
||
|
numchar2fct(numeric.threshold = 6) |>
|
||
|
ds2dd_detailed()
|
||
|
}
|