Skip to content

'Hidden' variable names (names prefixed with .) are not found #292

@cpsievert

Description

@cpsievert

This should work, but currently doesn't, since add_trace() only knows about the data that is input to plot_ly()

library(plotly)
library(broom)
library(dplyr)
economics %>%
  mutate(rate = unemploy / pop) %>%
  plot_ly(x = date, y = rate) %>%
  loess(rate ~ as.numeric(date), data = .) %>%
  augment() %>%
  add_trace(y = .fitted)

#> Error in eval(expr, envir, enclos) : object '.fitted' not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions