mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 01:49:39 +02:00
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run
30 lines
598 B
R
30 lines
598 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/helpers.R
|
|
\name{remove_empty_attr}
|
|
\alias{remove_empty_attr}
|
|
\title{Remove empty/NA attributes}
|
|
\usage{
|
|
remove_empty_attr(data)
|
|
}
|
|
\arguments{
|
|
\item{data}{data}
|
|
}
|
|
\value{
|
|
data of same class as input
|
|
}
|
|
\description{
|
|
Remove empty/NA attributes
|
|
}
|
|
\examples{
|
|
ds <- mtcars |>
|
|
lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |>
|
|
dplyr::bind_cols()
|
|
ds |>
|
|
remove_empty_attr() |>
|
|
str()
|
|
mtcars |>
|
|
lapply(\(.x) REDCapCAST::set_attr(.x, label = NA, attr = "label")) |>
|
|
remove_empty_attr() |>
|
|
str()
|
|
|
|
}
|