Skip to content

Failures in the magrittr pipe #276

@crcruzr

Description

@crcruzr

Hi, everyone

The operator "|>" doesn't work in a specific workflow, instead "%>%" works correctly

Thank you for our help

Cristian

#Dummy Database
df <- tibble::tribble(
  ~col2,        ~A, ~`B`, ~`C`, ~`D`, ~`F`, ~`G`,
  "E",          11,               10,              8,       5,     7,            7,
  "N",      0,                1,              2,       1,     1,            16,
  "O",            2,                1,              1,       2,     1,            0,
  "S",      7,               11,             13,       7,     8,            0
)

# Case when it works 
df %>%
  bind_rows(
    summarise(., col2 = "Max", across(where(is.numeric), ~20)),
  )

#Case when it doesn't work
 df |>
  bind_rows(
    summarise(col2 = "Max", across(where(is.numeric), ~20)),
  )

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