Skip to content

Commit

Permalink
Patch retail data function's usage of fill_gaps()
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchelloharawild committed Mar 17, 2024
1 parent 87639ca commit 45d2a57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assignments/A2.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ This assignment will use the same data that you will use in the [retail project]
library(fpp3)
get_my_data <- function(student_id) {
set.seed(student_id)
all_data <- fill_gaps(readr::read_rds("https://bit.ly/monashretaildata"))
all_data <- readr::read_rds("https://bit.ly/monashretaildata")
while(TRUE) {
retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))
if(!any(is.na(retail$Turnover))) return(retail)
if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)
}
}
# Replace the argument with your student ID
Expand Down
4 changes: 2 additions & 2 deletions assignments/Project.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ title: Retail Project
library(fpp3)
get_my_data <- function(student_id) {
set.seed(student_id)
all_data <- fill_gaps(readr::read_rds("https://bit.ly/monashretaildata"))
all_data <- readr::read_rds("https://bit.ly/monashretaildata")
while(TRUE) {
retail <- filter(all_data, `Series ID` == sample(`Series ID`, 1))
if(!any(is.na(retail$Turnover))) return(retail)
if(!any(is.na(fill_gaps(retail)$Turnover))) return(retail)
}
}
# Replace the argument with your student ID
Expand Down

0 comments on commit 45d2a57

Please sign in to comment.