Skip to content

Commit

Permalink
Additional documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robertzk committed Feb 2, 2016
1 parent 0bdf49c commit 9494c61
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
14 changes: 9 additions & 5 deletions R/caret.R
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 3 additions & 6 deletions man/createDataPartition.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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.}
Expand Down
21 changes: 21 additions & 0 deletions man/createFolds.Rd
Original file line number Diff line number Diff line change
@@ -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.
}

0 comments on commit 9494c61

Please sign in to comment.