Closed andrewallenbruce closed 1 month ago
Removed the call to janitor::round_half_up()
; rounding at point of data retrieval questionable anyway:
library(tidyverse)
library(clock)
library(provider)
tibble(
date = c(
date_build(2023, 12),
date_build(2024, 1:5)
),
total = c(
1132783.09,
942482.25,
949739.89,
985444.69,
888797.41,
808376.95
)) |>
provider::change(total)
#> # A tibble: 6 × 5
#> date total total_chg total_pct total_ror
#> <date> <dbl> <dbl> <dbl> <dbl>
#> 1 2023-12-01 1132783. 0 0 1
#> 2 2024-01-01 942482. -190301. -0.168 0.832
#> 3 2024-02-01 949740. 7258. 0.00770 1.01
#> 4 2024-03-01 985445. 35705. 0.0376 1.04
#> 5 2024-04-01 888797. -96647. -0.0981 0.902
#> 6 2024-05-01 808377. -80420. -0.0905 0.910
Created on 2024-05-13 with reprex v2.1.0
Error is on line 88, here:
Created on 2024-05-10 with reprex v2.1.0