Description Usage Arguments Author(s)
Given a time series, this function splits it into two, depending on the length of numTrain. The first numTrain observations go to the training set, the remainder into the testing set, while retaining the time series attributes of both objects and correctly adjusting the start times and frequencies of both sets.
1 | splitTrainTest(dat, numTrain = length(dat) - 10)
|
dat |
Time series |
numTrain |
The number of observations to keep in the training set |
Andrew K. Smith
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.