R Animated

library(magick)library(ggplot2)library(dplyr)library(tidyr) create a directory to which the images will be written dir_out <- file.path(tempdir(), “tx-sales”)dir.create(dir_out, recursive = TRUE) prepare data tx_sales <- txhousing %>%group_by(year,month) %>%summarise(sales = sum(sales, na.rm = TRUE)) %>%ungroup() %>%mutate(month = factor(month, labels = month.name)) %>%complete(month,year) get a sorted list of unique years in the TX housing dataset years <- tx_sales %>%pull(year) %>%unique(.)“R Animated” yazısının devamını oku