Skip to content

Trouble understanding check_key()  #2221

Open
@defuneste

Description

I had some trouble understanding check_key() when the columns provided is a valid unique key.

If the columns given in the ellipsis ARE a key, the data frame itself is returned silently, so that it can be used for piping.

Small example:

dat <- tibble(a = c(1, 2, 3), b = c(5, 5, 6), c = c(7, 8, 9))
(check_key(dat, a))
NULL

Should dat be returned instead of NULL or should the documentation be modified?

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions