@S1mona
Nothing here yet.
Nothing here yet.
No blogs yet.
Hi, one could capture.output from standardize_vec like this: stdout < - capture.output(groups < - lapply(X = 1 :length(Industries), FUN = function ( x ) { monthly_retail_tbl % > % filter(Industry = = Industries[x]) % > % arrange(Month) % > % mutate(Turnover = log1p(x = Turnover)) % > % mutate(Turnover = standardize_vec(Turnover)) % > % future_frame(Month, .length_out = "12 months" , .bind_data = TRUE) % > % mutate(Industry = Industries[x]) % > % tk_augment_fourier(.date_var = Month, .periods = 12 , .K = 1 ) % > % tk_augment_lags(. value = Turnover, .lags = 12 ) % > % tk_augment_slidify(. value = Turnover_lag12, .f = ~ mean(.x, na.rm = TRUE), .period = c( 3 , 6 , 9 , 12 ), .partial = TRUE, .align = "center" ) }), type = "message" ) And save mean and sd values automatically: collect_vals < - function ( stdout, string = "mean: " ) { stdout % > % grep( string , ., value = TRUE) % > % gsub( string , "" , .) % > % as .numeric() } std_mean < - stdout % > % collect_vals( "mean: " ) std_sd < - stdout % > % collect_vals( "standard deviation: " )