Skip to content

A simple test if a column exists #102

Closed

Description

@krlmlr
has_column(iris, "Alien")

Reason: is.null(iris$Alien) raises an error, "Alien" %in% names(iris) is a little too verbose and not pipe-able. Should be vectorized, too.

There's already assertthat::has_name() with this functionality, so perhaps this doesn't even belong here.

Activity

  1. modified the milestone: 1.1 on Jun 30, 2016
  2. self-assigned this
    on Jun 30, 2016
  3. added a commit that references this issue on Jun 30, 2016
  4. added 2 commits that reference this issue on Jun 30, 2016
  5. github-actions commented on Dec 15, 2020

    @github-actions
    Contributor

    This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

  6. locked and limited conversation to collaborators on Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions