% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/settlement.R
\name{score_settlement}
\alias{score_settlement}
\title{Score locations for spat settlement suitability}
\usage{
score_settlement(survey, species = "ostrea_edulis", verbose = TRUE)
}
\arguments{
\item{survey}{Dataframe of survey measurements. Same format as \code{\link[=predict_oyster]{predict_oyster()}}.}

\item{species}{Character. One of \code{"ostrea_edulis"} or \code{"magallana_gigas"}.}

\item{verbose}{Logical. Print summary (default TRUE).}
}
\value{
Dataframe with \code{settlement_suitability}, \code{settlement_class}, and
per-variable \verb{settle_score_*} columns. Combine with adult result via
\code{cbind()} or merge on \code{lat}/\code{lon}.
}
\description{
Assesses whether survey locations meet the conditions required for bivalve
larval settlement and metamorphosis. Settlement scoring uses a separate,
tighter tolerance specification than adult habitat scoring -- larvae are more
sensitive to turbidity, require minimum current flow for delivery, and need
hard substrate for attachment.

The output can be compared directly against the adult suitability score from
\code{\link[=predict_oyster]{predict_oyster()}} to distinguish "good adult habitat" from "likely natural
recruitment site."
}
\examples{
\donttest{
adult_result     <- predict_oyster(survey, "ostrea_edulis")
settlement_result <- score_settlement(survey, "ostrea_edulis")

# Identify cells suitable for both adult survival AND natural recruitment
combined <- merge(adult_result, settlement_result[, c("lat","lon",
              "settlement_suitability","settlement_class")],
              by = c("lat","lon"))
combined$dual_suitable <- combined$suitability >= 0.6 &
                          combined$settlement_suitability >= 0.6
}
}
