% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_functions.R
\name{ml_split}
\alias{ml_split}
\title{Split a data frame into training and test sets}
\usage{
ml_split(data, train_ratio = 0.8, seed = 42)
}
\arguments{
\item{data}{A \code{data.frame} to split.}

\item{train_ratio}{Numeric in (0,1); proportion for training. Default 0.8.}

\item{seed}{Integer random seed. Default 42.}
}
\value{
Named list with \code{train} and \code{test} data frames.
}
\description{
Split a data frame into training and test sets
}
\examples{
splits <- ml_split(mtcars, train_ratio = 0.75, seed = 1)
nrow(splits$train)
}
