% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chr_lengths.R
\name{chr_lengths}
\alias{chr_lengths}
\title{Calculate chromosome lengths}
\usage{
chr_lengths(map, collapse_to_AX = FALSE)
}
\arguments{
\item{map}{A list of vectors, each specifying locations of the markers.
Can also be a cross2 object, in which case the genetic map (if present) is used.}

\item{collapse_to_AX}{If TRUE, collapse to the total lengths of the
autosomes and X chromosome.}
}
\value{
A vector of chromosome lengths. If
\code{collapse_to_AX=TRUE}, the result is a vector of length 2
(autosomal and X chromosome lengths).
}
\description{
Calculate chromosome lengths for a map object
}
\details{
We take \code{diff(range(v))} for each vector, \code{v}.
}
\seealso{
\code{\link[=scan1perm]{scan1perm()}}
}
