Skip to content

Package qualifier :: treated as function when missing parentheses #236

Open
@mlell

Description

@mlell
data("mtcars")
mtcars$cyl %>% forcats::as_factor()
##  [1] 6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4
## Levels: 4 6 8

mtcars$cyl %>% forcats::as_factor
## Error in .::forcats : unused argument (as_factor)

So ::is treated as the function name when the parentheses are missing.
Is this on purpose or should it be fixed?

My version of magrittr is 2.0.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions