diff --git a/R/caret.R b/R/caret.R index 8a5013f..e0333ab 100644 --- a/R/caret.R +++ b/R/caret.R @@ -37,9 +37,9 @@ nzv <- function (x, freqCut = 95/5, uniqueCut = 10, saveMetrics = FALSE) { #' Data Splitting Functions #' A series of test/training partitions are created using -#' ‘createDataPartition’ while ‘createResample’ creates one or more -#' bootstrap samples. ‘createFolds’ splits the data into ‘k’ groups -#' while ‘createTimeSlices’ creates cross-validation sample +#' 'createDataPartition' while 'createResample' creates one or more +#' bootstrap samples. 'createFolds' splits the data into 'k' groups +#' while 'createTimeSlices' creates cross-validation sample #' information to be used with time series data. #' #' Check out documentation for `caret::createFolds` @@ -139,8 +139,12 @@ nearZeroVar <- function (x, freqCut = 95/5, uniqueCut = 10, saveMetrics = FALSE, res } -#' @inheritParams createDataPartition -#' @rdname createDataPartition +#' Create cross validation folds. +#' +#' @param y vector. A vector of stuff. +#' @param k integer. Number of folds. +#' @param list logical. Whether or not to return a list. +#' @param returnTrain logical. Whether or not to return the train data. #' @export createFolds <- function(y, k = 10, list = TRUE, returnTrain = FALSE) { diff --git a/man/createDataPartition.Rd b/man/createDataPartition.Rd index 3d700b8..d1b839c 100644 --- a/man/createDataPartition.Rd +++ b/man/createDataPartition.Rd @@ -2,18 +2,15 @@ % Please edit documentation in R/caret.R \name{createDataPartition} \alias{createDataPartition} -\alias{createFolds} \title{Data Splitting Functions A series of test/training partitions are created using - ‘createDataPartition’ while ‘createResample’ creates one or more - bootstrap samples. ‘createFolds’ splits the data into ‘k’ groups - while ‘createTimeSlices’ creates cross-validation sample + 'createDataPartition' while 'createResample' creates one or more + bootstrap samples. 'createFolds' splits the data into 'k' groups + while 'createTimeSlices' creates cross-validation sample information to be used with time series data.} \usage{ createDataPartition(y, times = 1, p = 0.5, list = TRUE, groups = min(5, length(y))) - -createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) } \arguments{ \item{y}{data.frame.} diff --git a/man/createFolds.Rd b/man/createFolds.Rd new file mode 100644 index 0000000..06134c1 --- /dev/null +++ b/man/createFolds.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/caret.R +\name{createFolds} +\alias{createFolds} +\title{Create cross validation folds.} +\usage{ +createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) +} +\arguments{ +\item{y}{vector. A vector of stuff.} + +\item{k}{integer. Number of folds.} + +\item{list}{logical. Whether or not to return a list.} + +\item{returnTrain}{logical. Whether or not to return the train data.} +} +\description{ +Create cross validation folds. +} +