Creates a single training/test subset for a dataset. Witholds a single timestep for testing, and a buffer of timesteps around that timestep.

subset_data_one(full_dataset, test_timestep, buffer_size)

Arguments

full_dataset

MATSS style dataset. A list with elements $abundance, $covariates

test_timestep

Which timestep (row) to withold and use for test

buffer_size

How many rows to withold on either side (not used for test)

Value

list with elements train (list of $abundance, $covariates), test (list of $abundance, $covariates), full (unaltered full_dataset), test_timestep (which tstep is the test one), buffer_size (buffer size)