Skip to content

slice_sample() shows strange suggestion when called with namespace #6946

Closed
@psychelzh

Description

@psychelzh

The error is simple as the follow:

dplyr::slice_sample(data.frame(x = 1:100), 10)
#> Error in `dplyr::slice_sample()`:
#> ! `n` must be explicitly named.
#> Did you mean `::(n = 10)`?
#> Did you mean `dplyr(n = 10)`?
#> Did you mean `slice_sample(n = 10)`?
#> Backtrace:
#>     ▆
#>  1. └─dplyr::slice_sample(data.frame(x = 1:100), 10)
#>  2.   └─dplyr:::check_slice_unnamed_n_prop(..., n = n, prop = prop)
#>  3.     └─rlang::abort(bullets, call = error_call)

Created on 2023-10-28 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions