has_tag: A selector function to use in 'tidyverse' functions

View source: R/has_tag.R

has_tagR Documentation

A selector function to use in tidyverse functions

Description

A selector function to use in tidyverse functions

Usage

has_tag(tags)

Arguments

tags

A character vector of tags you want to operate on

Value

A numeric vector containing the position of the columns with the requested tags

Examples

## create safeframe
x <- make_safeframe(cars,
  mph = "speed",
  distance = "dist"
)
head(x)

if (require(dplyr) && require(magrittr)) {
  x %>%
    select(has_tag(c("mph", "distance"))) %>%
    head()
}

safeframe documentation built on June 28, 2025, 1:08 a.m.