Skip to content

transmute() accessing a new variable fails #796

@krlmlr

Description

@krlmlr
library(tidyverse)
library(duckplyr)
#> ✔ Overwriting dplyr methods with duckplyr methods.
#> ℹ Turn off with `duckplyr::methods_restore()`.

data <-
  duckdb_tibble(
    g = c(1, 1, 2),
    a = 1:3,
    b = 2:4,
    c = 3:5,
    .prudence = "stingy"
  )

packed <-
  data |>
  transmute(g, d = a + b, e = d + c)
#> Error in `transmute()`:
#> ! This operation cannot be carried out by DuckDB, and the input is a
#>   stingy duckplyr frame.
#> ℹ Use `compute(prudence = "lavish")` to materialize to temporary storage and
#>   continue with duckplyr.
#> ℹ See `vignette("prudence")` for other options.
#> Caused by error:
#> ! object 'd' not found

Created on 2025-09-17 with reprex v2.1.1

Works with mutate(.keep = "unused") .

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