2024-11-19 12:54:26 +01:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
2024-11-20 12:09:13 +01:00
|
|
|
% Please edit documentation in R/as_factor.R
|
2024-11-19 12:54:26 +01:00
|
|
|
\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"
|
2024-11-20 12:40:29 +01:00
|
|
|
do.call(c,sapply(mtcars, get_attr))
|
|
|
|
\dontrun{
|
2024-11-19 12:54:26 +01:00
|
|
|
mtcars |>
|
|
|
|
numchar2fct(numeric.threshold = 6) |>
|
|
|
|
ds2dd_detailed()
|
|
|
|
}
|
2024-11-20 12:40:29 +01:00
|
|
|
}
|