| Title: | Tidy Tools for Forecasting |
| Version: | 0.2.6 |
| Description: | Tidies up the forecasting modeling and prediction work flow, extends the 'broom' package with 'sw_tidy', 'sw_glance', 'sw_augment', and 'sw_tidy_decomp' functions for various forecasting models, and enables converting 'forecast' objects to "tidy" data frames with 'sw_sweep'. |
| URL: | https://business-science.github.io/sweep/,https://github.com/business-science/sweep |
| BugReports: | https://github.com/business-science/sweep/issues |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| LazyData: | true |
| Depends: | R (≥ 3.3.0) |
| Imports: | broom (≥ 0.5.6), dplyr (≥ 1.0.0), forecast (≥ 8.0), rlang,tibble (≥ 1.2), timetk (≥ 2.1.0) |
| Suggests: | fracdiff, ggplot2, knitr, lubridate, purrr, readr, rmarkdown,scales, stringr, testthat (≥ 2.0.0), tidyr (≥ 1.0.0),tidyquant, zoo |
| RoxygenNote: | 7.3.2 |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 2 |
| NeedsCompilation: | no |
| Packaged: | 2025-08-28 15:15:39 UTC; mdancho |
| Author: | Matt Dancho [aut, cre], Davis Vaughan [aut] |
| Maintainer: | Matt Dancho <mdancho@business-science.io> |
| Repository: | CRAN |
| Date/Publication: | 2025-08-28 19:00:02 UTC |
sweep: Tidy Tools for Forecasting
Description
Thesweep package "tidies" up the modeling workflow of theforecast package.
Details
The model and forecast objects are not covered bythebroom package. It includes thesw_tidy(),sw_glance(),andsw_augment() functions that work in a similar capacity asbroom functions.In addition, it providessw_tidy_decomp() to tidy decomposition, andsw_sweep() to coerceforecast objects to "tibbles" for easy visualization withggplot2and manipulation withdplyr.
To learn more aboutsweep, start with the vignettes:browseVignettes(package = "sweep")
Author(s)
Maintainer: Matt Danchomdancho@business-science.io
Authors:
Davis Vaughandvaughan@business-science.io
See Also
Useful links:
Report bugs athttps://github.com/business-science/sweep/issues
Adds a sequential index column to a data frame
Description
Adds a sequential index column to a data frame
Usage
add_index(ret, rename_index)Arguments
ret | An object of class tibble |
rename_index | A variable indicating the index name to be used in thetibble returned |
Print the ARIMA model parameters
Description
Refer to forecast:::arima.string.forecast arima.R
Usage
arima_string(object, padding = FALSE)Arguments
object | An object of class Arima |
padding | Add padding to the name returned |
Print the BATS model parameters
Description
Refer to forecast:::makeText.forecast bats.R
Usage
bats_string(object)Arguments
object | An object of class bats |
Fictional sales data for bike shops purchasing Cannondale bikes
Description
A dataset containing the fictional bicycle orders spanning 2011 through 2015.Hypothetically, thebike_sales data are similar to sales data mainatainedin a business' sales data base. The unit price and model names come fromdata provided by model for the bicycle manufacturer, Cannondale (2016).The customers (bicycle shops) including name, location, etc andthe orders including quantity purchased and order dates are fictional.The data is intended for implementing business analytics techniques(e.g. forecast, clustering, etc) to identify underlying trends.
Usage
bike_salesFormat
A data frame with 15644 rows and 17 variables:
- order.date
Date the order was placed
- order.id
A unique order identification number
- order.line
The sequential identification number for products on and order
- quantity
Number of units purchased
- price
The unit price of the bicycle
- price.ext
The extended price = price x quantity
- customer.id
A unique customer identification number
- bikeshop.name
The customer name
- bikeshop.city
The city that the bike shop is located
- bikeshop.state
The state that the bike shop is located
- latitude
The geograhpic latitude of the customer location
- longitude
The geograhpic longitude of the customer location
- product.id
A unique product identification number
- model
The model name of the bicycle
- category.primary
The main bicycle category, either "Mountain" or "Road"
- category.secondary
One of nine more specific bicycle categories
- frame
The bicycle frame material, either "Carbon" or "Aluminum"
Source
The 2016 bicycle model names and prices originated fromhttps://www.cannondale.com/en-us
Objects exported from other packages
Description
These objects are imported from other packages. Follow the linksbelow to see their documentation.
- dplyr
Augment data according to a tidied model
Description
Given an R statistical model or other non-tidy object, add columns to theoriginal dataset such as predictions, residuals and cluster assignments.
Usage
sw_augment(x, ...)Arguments
x | model or other R object to convert to data frame |
... | other arguments passed to methods |
Details
sw_augment() is a wrapper forbroom::augment(). The benefit ofsw_augmentis that it has methods for various time-series model classes such asHoltWinters,ets,Arima, etc.
For non-time series,sw_augment() defaults tobroom::augment().The only difference is that the return is a tibble.
Note that by convention the first argument is almost alwaysdata,which specifies the original data object. This is not part of the S3signature, partly because it prevents rowwise_df_tidiers fromtaking a column name as the first argument.
See Also
Default augment method
Description
By default,sw_augment() usesbroom::augment() to convert its output.
Usage
## Default S3 method:sw_augment(x, ...)Arguments
x | an object to be tidied |
... | extra arguments passed to |
Value
A tibble generated bybroom::augment()
Augments data
Description
Augments data
Usage
sw_augment_columns(ret, data, rename_index, timetk_idx = FALSE)Arguments
ret | An object of class tibble |
data | Any time series data that is to be augmented |
rename_index | A variable indicating the index name to be used in thetibble returned |
timetk_idx | Uses the timetk index (irregular time index) if present. |
Construct a single row summary "glance" of a model, fit, or otherobject
Description
Construct a single row summary "glance" of a model, fit, or otherobject
Usage
sw_glance(x, ...)Arguments
x | model or other R object to convert to single-row data frame |
... | other arguments passed to methods |
Details
sw_glance() is a wrapper forbroom::glance(). The benefit ofsw_glanceis that it has methods for various time-series model classes such asHoltWinters,ets,Arima, etc.sw_glance methods always return either a one-row tibble orNULL.The single row includes summary statistics relevent to the model accuracy,which can be used to assess model fit and quality.
For non-time series,sw_glance() defaults tobroom::glance().The only difference is that the return is a tibble.
Value
single-row tibble with model summary information.
See Also
Default glance method
Description
By default,sw_glance() usesbroom::glance() to convert its output.
Usage
## Default S3 method:sw_glance(x, ...)Arguments
x | an object to be tidied |
... | extra arguments passed to |
Value
A tibble generated bybroom::glance()
Tidy forecast objects
Description
Tidy forecast objects
Usage
sw_sweep(x, fitted = FALSE, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | A time-series forecast of class |
fitted | Whether or not to return the fitted values (model values) in the results.FALSE by default. |
timetk_idx | If timetk index (non-regularized index) is present, uses itto develop forecast. Otherwise uses default index. |
rename_index | Enables the index column to be renamed. |
... | Additional arguments passed to |
Details
sw_sweep is designedto coerceforecast objects from theforecast packageintotibble objects in a "tidy" format (long).The returned object contains both the actual valuesand the forecasted values including the point forecast and upper and lowerconfidence intervals.
Thetimetk_idx argument is used to modify the return format of the index.
If
timetk_idx = FALSE, a regularized time index is always constructed.This may be in the format of numeric values (e.g. 2010.000) or thehigher orderyearmonandyearqtrclasses from thezoopackage.A higher order class is attempted to be returned.If
timetk_idx = TRUEand a timetk index is present, an irregular time indexwill be returned that combines the original time series (i.e. date or datetime)along with a computed future time series created usingtimetk::tk_make_future_timeseries()from thetimetkpackage. The...can be used to pass additional argumentstotimetk::tk_make_future_timeseries()such asinspect_weekdays,skip_values, etcthat can be useful in tuning the future time series sequence.
The index column name can be changed using therename_index argument.
Value
Returns atibble object.
See Also
timetk::tk_make_future_timeseries()
Examples
library(forecast)library(dplyr)# ETS forecastsUSAccDeaths %>% ets() %>% forecast(level = c(80, 95, 99)) %>% sw_sweep()Tidy the result of a time-series model into a summary tibble
Description
Tidy the result of a time-series model into a summary tibble
Usage
sw_tidy(x, ...)Arguments
x | An object to be converted into a tibble ("tidy" data.frame) |
... | extra arguments |
Details
sw_tidy() is a wrapper forbroom::tidy(). The main benefit ofsw_tidy()is that it has methods for various time-series model classes such asHoltWinters,ets,Arima, etc.sw_tidy() methods always returns a "tidy" tibble with model coefficient / parameters.
For non-time series,sw_tidy() defaults tobroom::tidy().The only difference is that the return is a tibble.The output ofsw_tidy() is always a tibble with disposable row names. It istherefore suited for further manipulation by packages like dplyr andggplot2.
Value
a tibble
See Also
Examples
library(dplyr)library(forecast)WWWusage %>% auto.arima() %>% sw_tidy(conf.int = TRUE)Default tidying method
Description
By default,sw_tidy() usesbroom::tidy() to convert its output.
Usage
## Default S3 method:sw_tidy(x, ...)Arguments
x | an object to be tidied |
... | extra arguments passed to |
Value
A tibble generated bybroom::tidy()
Coerces decomposed time-series objects to tibble format.
Description
Coerces decomposed time-series objects to tibble format.
Usage
sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | A time-series object of class |
timetk_idx | When |
rename_index | Enables the index column to be renamed. |
... | Not used. |
Details
sw_tidy_decomp is designedto coerce time-series objects with decompositions totibble objects.
A regularized time index is always constructed. If no time index isdetected, a sequential index is returned as a default.The index column name can be changed using therename_index argument.
Value
Returns atibble object.
Examples
library(dplyr)library(forecast)library(sweep)# Decompose ETS modelUSAccDeaths %>% ets() %>% sw_tidy_decomp()# Decompose STL objectUSAccDeaths %>% stl(s.window = 'periodic') %>% sw_tidy_decomp()Print the TBATS model parameters
Description
Refer to forecast:::makeTextTBATS.forecast bats.R
Usage
tbats_string(object)Arguments
object | An object of class bats or tbats |
Tidying methods for HoltWinters modeling of time series
Description
These methods tidyHoltWinters models of univariate timeseries.
Usage
## S3 method for class 'HoltWinters'sw_tidy(x, ...)## S3 method for class 'HoltWinters'sw_glance(x, ...)## S3 method for class 'HoltWinters'sw_augment(x, data = NULL, rename_index = "index", timetk_idx = FALSE, ...)## S3 method for class 'HoltWinters'sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | An object of class "HoltWinters" |
... | Additional parameters (not used) |
data | Used with |
rename_index | Used with |
timetk_idx | Used with |
Value
sw_tidy() returns one row for each model parameter,with two columns:
term: The various parameters (alpha, beta, gamma, and coefficients)estimate: The estimated parameter value
sw_glance() returns one row with the following columns:
model.desc: A description of the modelsigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the modelAIC: The Akaike Information CriterionBIC: The Bayesian Information Criterion (NAfor bats / tbats)ME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
sw_tidy_decomp() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposesobserved: The original time seriesseason: The seasonal componenttrend: The trend componentremainder: observed - (season + trend)seasadj: observed - season (or trend + remainder)
See Also
Examples
library(dplyr)library(forecast)fit_hw <- USAccDeaths %>% stats::HoltWinters()sw_tidy(fit_hw)sw_glance(fit_hw)sw_augment(fit_hw)sw_tidy_decomp(fit_hw)Tidying methods for StructTS (Error, Trend, Seasonal) / exponential smoothingmodeling of time series
Description
These methods tidy the coefficients of StructTS models of univariate timeseries.
Usage
## S3 method for class 'StructTS'sw_tidy(x, ...)## S3 method for class 'StructTS'sw_glance(x, ...)## S3 method for class 'StructTS'sw_augment(x, data = NULL, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | An object of class "StructTS" |
... | Additional parameters (not used) |
data | Used with |
timetk_idx | Used with |
rename_index | Used with |
Value
sw_tidy() returns one row for each model parameter,with two columns:
term: The model parametersestimate: The estimated parameter value
sw_glance() returns one row with the columns
model.desc: A description of the model including thethree integer components (p, d, q) are the AR order,the degree of differencing, and the MA order.sigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the modelAIC: The Akaike Information CriterionBIC: The Bayesian Information CriterionME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
See Also
Examples
library(dplyr)library(forecast)fit_StructTS <- WWWusage %>% StructTS()sw_tidy(fit_StructTS)sw_glance(fit_StructTS)sw_augment(fit_StructTS)Tidying methods for ARIMA modeling of time series
Description
These methods tidy the coefficients of ARIMA models of univariate timeseries.
Usage
## S3 method for class 'Arima'sw_tidy(x, ...)## S3 method for class 'Arima'sw_glance(x, ...)## S3 method for class 'Arima'sw_augment(x, data = NULL, rename_index = "index", timetk_idx = FALSE, ...)## S3 method for class 'stlm'sw_tidy(x, ...)Arguments
x | An object of class "Arima" |
... | Additional parameters (not used) |
data | Used with |
rename_index | Used with |
timetk_idx | Used with |
Value
sw_tidy() returns one row for each coefficient in the model,with five columns:
term: The term in the nonlinear model being estimated and testedestimate: The estimated coefficient
sw_glance() returns one row with the columns
model.desc: A description of the model including thethree integer components (p, d, q) are the AR order,the degree of differencing, and the MA order.sigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the modelAIC: The Akaike Information CriterionBIC: The Bayesian Information CriterionME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
sw_tidy() returns the underlying ETS or ARIMA model'ssw_tidy()one row for each coefficient in the model,with five columns:
term: The term in the nonlinear model being estimated and testedestimate: The estimated coefficient
See Also
Examples
library(dplyr)library(forecast)fit_arima <- WWWusage %>% auto.arima()sw_tidy(fit_arima)sw_glance(fit_arima)sw_augment(fit_arima)Tidying methods for BATS and TBATS modeling of time series
Description
Tidying methods for BATS and TBATS modeling of time series
Usage
## S3 method for class 'bats'sw_tidy(x, ...)## S3 method for class 'bats'sw_glance(x, ...)## S3 method for class 'bats'sw_augment(x, data = NULL, rename_index = "index", timetk_idx = FALSE, ...)## S3 method for class 'bats'sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | An object of class "bats" or "tbats" |
... | Additional parameters (not used) |
data | Used with |
rename_index | Used with |
timetk_idx | Used with |
Value
sw_tidy() returns one row for each model parameter,with two columns:
term: The various parameters (lambda, alpha, gamma, etc)estimate: The estimated parameter value
sw_glance() returns one row with the columns
model.desc: A description of the model including thethree integer components (p, d, q) are the AR order,the degree of differencing, and the MA order.sigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the modelAIC: The Akaike Information CriterionBIC: The Bayesian Information Criterion (NAfor bats / tbats)ME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
sw_tidy_decomp() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposesobserved: The original time serieslevel: The level componentslope: The slope component (Not always present)season: The seasonal component (Not always present)
See Also
forecast::bats(),forecast::tbats()
Examples
library(dplyr)library(forecast)fit_bats <- WWWusage %>% bats()sw_tidy(fit_bats)sw_glance(fit_bats)sw_augment(fit_bats)Tidying methods for decomposed time series
Description
Tidying methods for decomposed time series
Usage
## S3 method for class 'decomposed.ts'sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | An object of class "decomposed.ts" |
timetk_idx | Used with |
rename_index | Used with |
... | Not used. |
Value
sw_tidy_decomp() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposesseason: The seasonal componenttrend: The trend componentrandom: The error componentseasadj: observed - season
See Also
Examples
library(dplyr)library(forecast)fit_decomposed <- USAccDeaths %>% decompose()sw_tidy_decomp(fit_decomposed)Tidying methods for ETS (Error, Trend, Seasonal) exponential smoothingmodeling of time series
Description
Tidying methods for ETS (Error, Trend, Seasonal) exponential smoothingmodeling of time series
Usage
## S3 method for class 'ets'sw_tidy(x, ...)## S3 method for class 'ets'sw_glance(x, ...)## S3 method for class 'ets'sw_augment(x, data = NULL, timetk_idx = FALSE, rename_index = "index", ...)## S3 method for class 'ets'sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | An object of class "ets" |
... | Not used. |
data | Used with |
timetk_idx | Used with |
rename_index | Used with |
Value
sw_tidy() returns one row for each model parameter,with two columns:
term: The smoothing parameters (alpha, gamma) and the initial states(l, s0 through s10)estimate: The estimated parameter value
sw_glance() returns one row with the columns
model.desc: A description of the model including thethree integer components (p, d, q) are the AR order,the degree of differencing, and the MA order.sigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the modelAIC: The Akaike Information CriterionBIC: The Bayesian Information CriterionME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
sw_tidy_decomp() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposesobserved: The original time serieslevel: The level componentslope: The slope component (Not always present)season: The seasonal component (Not always present)
See Also
Examples
library(dplyr)library(forecast)fit_ets <- WWWusage %>% ets()sw_tidy(fit_ets)sw_glance(fit_ets)sw_augment(fit_ets)sw_tidy_decomp(fit_ets)Tidying methods for Nural Network Time Series models
Description
These methods tidy the coefficients of NNETAR models of univariate timeseries.
Usage
## S3 method for class 'nnetar'sw_tidy(x, ...)## S3 method for class 'nnetar'sw_glance(x, ...)## S3 method for class 'nnetar'sw_augment(x, data = NULL, timetk_idx = FALSE, rename_index = "index", ...)Arguments
x | An object of class "nnetar" |
... | Additional parameters (not used) |
data | Used with |
timetk_idx | Used with |
rename_index | Used with |
Value
sw_tidy() returns one row for each model parameter,with two columns:
term: The smoothing parameters (alpha, gamma) and the initial states(l, s0 through s10)estimate: The estimated parameter value
sw_glance() returns one row with the columns
model.desc: A description of the model including thethree integer components (p, d, q) are the AR order,the degree of differencing, and the MA order.sigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the model (NA)AIC: The Akaike Information Criterion (NA)BIC: The Bayesian Information Criterion (NA)ME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
See Also
Examples
library(dplyr)library(forecast)fit_nnetar <- lynx %>% nnetar()sw_tidy(fit_nnetar)sw_glance(fit_nnetar)sw_augment(fit_nnetar)Tidying methods for STL (Seasonal, Trend, Level) decomposition of time series
Description
Tidying methods for STL (Seasonal, Trend, Level) decomposition of time series
Usage
## S3 method for class 'stl'sw_tidy(x, ...)## S3 method for class 'stl'sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)## S3 method for class 'stlm'sw_tidy_decomp(x, timetk_idx = FALSE, rename_index = "index", ...)## S3 method for class 'stlm'sw_glance(x, ...)## S3 method for class 'stlm'sw_augment(x, data = NULL, rename_index = "index", timetk_idx = FALSE, ...)Arguments
x | An object of class "stl" |
... | Not used. |
timetk_idx | Used with |
rename_index | Used with |
data | Used with |
Value
sw_tidy() wrapssw_tidy_decomp()
sw_tidy_decomp() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposesseason: The seasonal componenttrend: The trend componentremainder: observed - (season + trend)seasadj: observed - season (or trend + remainder)
sw_glance() returns the underlying ETS or ARIMA model'ssw_glance() results one row with the columns
model.desc: A description of the model including thethree integer components (p, d, q) are the AR order,the degree of differencing, and the MA order.sigma: The square root of the estimated residual variancelogLik: The data's log-likelihood under the modelAIC: The Akaike Information CriterionBIC: The Bayesian Information CriterionME: Mean errorRMSE: Root mean squared errorMAE: Mean absolute errorMPE: Mean percentage errorMAPE: Mean absolute percentage errorMASE: Mean absolute scaled errorACF1: Autocorrelation of errors at lag 1
sw_augment() returns a tibble with the following time series attributes:
index: An index is either attempted to be extracted from the model ora sequential index is created for plotting purposes.actual: The original time series.fitted: The fitted values from the model.resid: The residual values from the model
See Also
Examples
library(dplyr)library(forecast)library(sweep)fit_stl <- USAccDeaths %>% stl(s.window = "periodic")sw_tidy_decomp(fit_stl)Validates data frame has column named the same name as variable rename_index
Description
Validates data frame has column named the same name as variable rename_index
Usage
validate_index(ret, rename_index)Arguments
ret | An object of class tibble |
rename_index | A variable indicating the index name to be used in thetibble returned |