Skip to content

slice_*: argument n and prop can be negative for all but slice_sample? #6402

Closed

Description

@MatthieuStigler

It seems that arguments n and prop are allowed to be negative (doc: If a negative value of n or prop is provided, ....) for all sample_* function except for slice_sample? Is that desired (yet undocumented?) behaviour, or an omission?

dplyr::slice_sample(iris, n=-1)
#> Error in `dplyr::slice_sample()`:
#> ! `n` must be positive.
``

Activity

  1. added a commit that references this issue on Aug 16, 2022
    adf1114
  2. added
    featurea feature request or enhancement
    rows ↕️Operations on rows: filter(), slice(), arrange()
    on Aug 16, 2022
  3. added a commit that references this issue on Aug 18, 2022
    ee313a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementrows ↕️Operations on rows: filter(), slice(), arrange()

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions