Pivot data obtained with the function gwr. Groups all the data
points for each entity/row into a single list of elements.
pivot_data(
.data,
timestep = "^T[0-9]*",
cols = colnames(.data) %>% stringr::str_detect(timestep, negate = TRUE) %>%
which(),
scale = 1,
add = 0,
varname = "value"
)Data frame (tibble object) obtained with
gwr.
String with the pattern used to name each data point at each
time-step. Default: "^T[0-9]*".
Metadata columns (latitude, longitude, etc.), to
be excluded from the data pivoting. Default: excluded columns matching
the timestep pattern, for the default pattern, ignores columns
with the prefix T and digits as suffix (e.g., T1,
T2, ..., Tt, etc.).
Numeric value to scale the data. Default: 1, no scaling.
Numeric value to be added/subtracted from the data points.
Default: 0, don't add anything.
Output variable name. Default: "value".
Data frame (tibble object) with a new column named according
to the string passed with value, this new column contains a list
of the data points at each time step for each observation/row.