% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assertion.R
\name{check_last_level}
\alias{check_last_level}
\alias{assert_last_level}
\title{Assert level}
\usage{
check_last_level(x, class)

assert_last_level(x, class, .var.name = checkmate::vname(x), add = NULL)
}
\arguments{
\item{x}{\code{picks} object}

\item{class}{Class of the last element of picks}

\item{.var.name}{[\code{character(1)}]\cr
The custom name for \code{x} as passed to any \code{assert*} function.
Defaults to a heuristic name lookup.}

\item{add}{[\code{AssertCollection}]\cr
Collection to store assertion messages. See \code{\link[checkmate]{AssertCollection}}.}
}
\value{
For \code{check_last_level} a logical value or a string.
For \code{assert_last_level} invisibly the object checked or an error.
}
\description{
Assert level
}
\examples{
x <- picks(datasets(), variables(), values())
assert_last_level(x, "values")
}
