#' Split
#'
#' This function takes a dataset and the number of observations you would like split to test.
#'
#' @param data The dataset you would like to split.
#' @param nobs The number of observations you want the test set to contain.
#'
#' @export
#'
#'
Split <- function(data,nobs){
out <- list()
end <- length(data$X)
sel <- end+1-nobs
train <- data[1:(sel-1),]
test <- data[sel:end,]
out[[1]] <- train
out[[2]] <- test
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.