@@ -185,8 +185,8 @@ plot_vintages <- function(
185185 n <- length(unique(df [[dim_col ]]))
186186
187187 df <- df %> %
188- dplyr :: group_by(.data $ time ) %> %
189- dplyr :: arrange(dplyr :: desc(abs(.data $ value )), .by_group = TRUE ) %> %
188+ dplyr :: group_by(" time" ) %> %
189+ dplyr :: arrange(dplyr :: desc(abs(" value" )), .by_group = TRUE ) %> %
190190 dplyr :: ungroup()
191191
192192 if (n > 1 ) {
@@ -209,20 +209,20 @@ plot_vintages <- function(
209209 if (type == " line" ) {
210210 p <- p +
211211 ggplot2 :: geom_line(
212- ggplot2 :: aes(x = !! time_col , y = .data $ value ), data = df
212+ ggplot2 :: aes(x = !! time_col , y = " value" ), data = df
213213 ) +
214214 scale_color_reviser()
215215 } else if (type == " point" ) {
216216 p <- p +
217217 ggplot2 :: geom_point(
218- ggplot2 :: aes(x = !! time_col , y = .data $ value ),
218+ ggplot2 :: aes(x = !! time_col , y = " value" ),
219219 data = df
220220 ) +
221221 scale_color_reviser()
222222 } else if (type == " bar" ) {
223223 p <- p +
224224 ggplot2 :: geom_bar(
225- ggplot2 :: aes(x = !! time_col , y = .data $ value ),
225+ ggplot2 :: aes(x = !! time_col , y = " value" ),
226226 data = df ,
227227 position = " identity" ,
228228 stat = " identity"
@@ -240,14 +240,14 @@ plot_vintages <- function(
240240 if (type == " line" ) {
241241 p <- p +
242242 ggplot2 :: geom_line(
243- ggplot2 :: aes(x = !! time_col , y = .data $ value , color = !! dim_col ),
243+ ggplot2 :: aes(x = !! time_col , y = " value" , color = !! dim_col ),
244244 data = df
245245 ) +
246246 scale_color_reviser()
247247 } else if (type == " point" ) {
248248 p <- p +
249249 ggplot2 :: geom_point(
250- ggplot2 :: aes(x = !! time_col , y = .data $ value , color = !! dim_col ),
250+ ggplot2 :: aes(x = !! time_col , y = " value" , color = !! dim_col ),
251251 data = df
252252 ) +
253253 scale_color_reviser()
@@ -256,7 +256,7 @@ plot_vintages <- function(
256256 ggplot2 :: geom_bar(
257257 ggplot2 :: aes(
258258 x = !! time_col ,
259- y = .data $ value ,
259+ y = " value" ,
260260 color = !! dim_col ,
261261 fill = !! dim_col
262262 ),
@@ -270,7 +270,7 @@ plot_vintages <- function(
270270 p <- p +
271271 ggplot2 :: geom_boxplot(
272272 ggplot2 :: aes(
273- x = !! time_col , y = .data $ value , fill = factor (!! time_col )
273+ x = !! time_col , y = " value" , fill = factor (!! time_col )
274274 ),
275275 data = df
276276 ) +
@@ -345,14 +345,14 @@ plot.revision_model <- function(x, state = NULL, type = "filtered", ...) {
345345 ggplot2 :: geom_ribbon(
346346 data = in_sample_data ,
347347 ggplot2 :: aes(
348- x = .data $ time , ymin = .data $ lower , ymax = .data $ upper , fill = sample
348+ x = " time" , ymin = " lower" , ymax = " upper" , fill = sample
349349 ),
350350 alpha = 0.2
351351 ) +
352352 ggplot2 :: geom_line(
353353 data = in_sample_data ,
354354 ggplot2 :: aes(
355- x = .data $ time , y = .data $ estimate , color = sample , linetype = sample
355+ x = " time" , y = " estimate" , color = sample , linetype = sample
356356 ),
357357 linewidth = 0.8
358358 )
@@ -364,10 +364,10 @@ plot.revision_model <- function(x, state = NULL, type = "filtered", ...) {
364364 ggplot2 :: geom_crossbar(
365365 data = oos_data ,
366366 ggplot2 :: aes(
367- x = .data $ time ,
368- y = .data $ estimate ,
369- ymin = .data $ lower ,
370- ymax = .data $ upper ,
367+ x = " time" ,
368+ y = " estimate" ,
369+ ymin = " lower" ,
370+ ymax = " upper" ,
371371 color = sample ,
372372 fill = sample
373373 ),
@@ -377,7 +377,7 @@ plot.revision_model <- function(x, state = NULL, type = "filtered", ...) {
377377 ggplot2 :: geom_point(
378378 data = oos_data ,
379379 ggplot2 :: aes(
380- x = .data $ time , y = .data $ estimate , color = sample , fill = sample
380+ x = " time" , y = " estimate" , color = sample , fill = sample
381381 ),
382382 size = 2
383383 )
@@ -386,14 +386,14 @@ plot.revision_model <- function(x, state = NULL, type = "filtered", ...) {
386386 ggplot2 :: geom_ribbon(
387387 data = oos_data ,
388388 ggplot2 :: aes(
389- x = .data $ time , ymin = .data $ lower , ymax = .data $ upper , fill = sample
389+ x = " time" , ymin = " lower" , ymax = " upper" , fill = sample
390390 ),
391391 alpha = 0.2
392392 ) +
393393 ggplot2 :: geom_line(
394394 data = oos_data ,
395395 ggplot2 :: aes(
396- x = .data $ time , y = .data $ estimate , color = sample , linetype = sample
396+ x = " time" , y = " estimate" , color = sample , linetype = sample
397397 ),
398398 linewidth = 0.8
399399 )
0 commit comments