microsoft / datamations

https://microsoft.github.io/datamations/
Other
67 stars 14 forks source link

Resolve warnings that happen from README demo code #15

Closed jhofman closed 3 years ago

jhofman commented 3 years ago

Running this:

library(tidyverse)
library(datamations)

mean_salary_by_degree_pipe <- "small_salary %>% group_by(Degree) %>% summarize(mean = mean(Salary))"

degree_title_step1 <- "Step 1: Each dot shows one person\n and each group shows degree type"
degree_title_step2 <- "Step 2: Next you plot the salary of each person\n within each group"
degree_title_step3 <- "Step 3: Lastly you plot the average salary \n of each group and zoom in"

datamation_sanddance(
  pipeline = mean_salary_by_degree_pipe,
  output = "mean_salary_group_by_degree.gif",
  titles = c(degree_title_step1, degree_title_step2, degree_title_step3),
  nframes = 30
)

gives the following error messages:

Warning messages:
1: Unknown or uninitialised column: `.id`. 
2: Unknown or uninitialised column: `.frame`. 
3: Unknown or uninitialised column: `.id`. 
4: `funs()` was deprecated in dplyr 0.8.0.
Please use a list of either functions or lambdas: 

  # Simple named list: 
  list(mean = mean, median = median)

  # Auto named with `tibble::lst()`: 
  tibble::lst(mean, median)

  # Using lambdas
  list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated. 
5: Unknown or uninitialised column: `.id`. 
6: Unknown or uninitialised column: `.frame`. 
7: Unknown or uninitialised column: `.id`. 
8: Unknown or uninitialised column: `.id`.