Skip to content

[docs]: add reference to data set in dplyr mutations across functions #479

Open

Description

@Schiano-NOAA

It is best practice to do this:

my_function <- function(data_input, happy = 2) {
  dplyr::mutate(
    data_input,
    new_column = .env$happy,
    manipulated_column = .data$happy / 2
  )
}

mentioned in PR #474

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions