% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/539_ylt_add_cat_2_longylt.R
\name{ylt_add_cat_2_longylt}
\alias{ylt_add_cat_2_longylt}
\title{Adds a cat column to a long ylt, based on windspeed}
\usage{
ylt_add_cat_2_longylt(longylt, units)
}
\arguments{
\item{longylt}{A data frame containing the long YLT}

\item{units}{"knots","mph"}
}
\value{
A new longylt with a cat column added
}
\description{
Calculates cat from windspeed, and adds a column for that.
Requires \code{wspd} in the input longylt.
}
\details{
Cat runs from -1 to 5.
Different people use different cat boundaries.
To see the boundaries being used, type \code{ws2catf}.
}
\examples{
#
# 1 create a long YLT
#
cat("1. longylt:\n")
year=c(1,1,1,2,2,3,3,4,4,4,5,5,5,5,5)
wspd=seq(10,150,10)
longylt1=data.frame(year,wspd)
print(longylt1)
#
longylt2=ylt_add_cat_2_longylt(longylt1,units="knots")
#
print(longylt2)
}
\author{
Stephen Jewson \email{stephen.jewson@gmail.com}
}
