Commit ab486dc0 authored by Thomas Shatwell's avatar Thomas Shatwell
Browse files

Some bug fixes in documentation references

parent 36073c8c
......@@ -3,7 +3,8 @@
#' @description Calculates seasonal ice phenology including annual mean,
#' max and total duration of ice cover.
#'
#' @param H_ice A vector indicating the presence of ice cover. Can be numerical or logical where `TRUE` or any number > `0` (e.g. ice thickness, indicates ice.
#' @param H_ice A vector indicating the presence of ice cover.
#' Can be numerical or logical where `TRUE` or any number > `0` (e.g. ice thickness) indicates ice, and
#' `FALSE` or `0` indicates no ice cover.
#' @param dates The dates corresponding to the ice observations in POSIX style and same length as `H_ice`.
#' @param NH Is the lake in the northern hemisphere? (logical)
......
......@@ -35,7 +35,7 @@ read_ixx <- function(filename, keep = "all", clean=TRUE,
TZ="UTC") {
info <- get_profile_info(filename) # extracts info from the filename
ext <- info["ext"] # sonde name comes from the file extension
if(!grepl(pattern = "i[*0-9]", x = sonde)) {
if(!grepl(pattern = "i[*0-9]", x = ext)) {
warning("File does not have ixxx extension, attempting anyway...")
}
# top <- readLines(con = filename,n=2) # read the top 50 lines of the file
......
......@@ -5,7 +5,7 @@
#' @param t Temperature in degrees Celsius (numeric)
#'
#' @details
#' Calculates the density from temperature [kg m^-3] using the formula of Millero & Poisson (1981).
#' Calculates the density from temperature (kg m^-3) using the formula of Millero & Poisson (1981).
#' this is the method stated in the isimip 2b protocol in July 2019
#'
#' @return numeric vector the same length as `t`
......
......@@ -7,7 +7,7 @@
#' @param Tb Bottom temperature (numeric vector with same length as `Ts`.
#' @param H_ice Ice thickness as numeric vector of the same length as `Ts`. `NULL` if ice statistics should not be calculated.
#' @param dates The dates corresponding to the temperature measurements in POSIX style and same length as `Ts`.
#' @param thresh The density or temperature threshold used to define the presence of stratification, ie whether the difference between Ts and Tb exceeds this threshold. If `bydensity` is `TRUE`, then `thresh` must be in [kg m^-3], and `Ts` and `Tb` must be in Celsius.
#' @param thresh The density or temperature threshold used to define the presence of stratification, ie whether the difference between Ts and Tb exceeds this threshold. If `bydensity` is `TRUE`, then `thresh` must be in (kg m^-3), and `Ts` and `Tb` must be in Celsius.
#' @param NH Is the lake in the northern hemisphere? (logical)
#' @param bydensity Should `thresh` be defined as a density threshold (logical)? If `FALSE`, a temperature threshold is assumed. If `TRUE`, then `Ts` and `Tb` must be in degrees Celsius
#'
......
......@@ -19,8 +19,11 @@ Fast calculation of the upper thermocline boundary
}
\details{
Calculates mixed layer depths as the depth of the maximum temperature gradient (dT/dz).
Designed to be as fast as possible for large data sets, so doesn't do any checks at all, so be careful.
#' Choose the right vertical resolution in the temperatures to ensure a more robust result.
Designed to be as fast as possible for large data sets. It doesn't do any checks at all,
and only works with regular data, so be careful.
Choose the right vertical resolution in the temperatures to ensure a more robust result.
Use the rLakeAnalyzer functions for more robust solutions which are
orders of magnitude slower.
}
\examples{
\dontrun{
......
......@@ -7,7 +7,8 @@
ice_phenology(H_ice, dates, NH = TRUE)
}
\arguments{
\item{H_ice}{A vector indicating the presence of ice cover. Can be numerical or logical where \code{TRUE} or any number > \code{0} (e.g. ice thickness, indicates ice.
\item{H_ice}{A vector indicating the presence of ice cover.
Can be numerical or logical where \code{TRUE} or any number > \code{0} (e.g. ice thickness) indicates ice, and
\code{FALSE} or \code{0} indicates no ice cover.}
\item{dates}{The dates corresponding to the ice observations in POSIX style and same length as \code{H_ice}.}
......
......@@ -15,11 +15,11 @@ read_bbe(
\arguments{
\item{filename}{Name of the file to read, including the file extension}
\item{keep}{names of the columns to retain in the output. Defaults to `"all"``}
\item{keep}{names of the columns to retain in the output. Defaults to \code{"all"}}
\item{clean}{Should the profile be cleaned? (logical)}
\item{TZ}{time zone given to the output datetimes, defaults to `"UTC"`` (recommended)}
\item{TZ}{time zone given to the output datetimes, defaults to \code{"UTC"} (recommended)}
}
\value{
A \code{data.frame} containing the profile data
......
......@@ -4,14 +4,16 @@
\alias{read_ixx}
\title{Reads profile data from raw output file from a CTD of type ixxx}
\usage{
read_ixx(filename, keep = c("depth"), TZ = "UTC")
read_ixx(filename, keep = "all", clean = TRUE, TZ = "UTC")
}
\arguments{
\item{filename}{Name of the file to read, including the file extension}
\item{keep}{names of the columns to retain in the output. Defaults to `"all"``}
\item{keep}{names of the columns to retain in the output. Defaults to \code{"all"}}
\item{TZ}{time zone given to the output datetimes, defaults to `"UTC"`` (recommended)}
\item{clean}{Should the profile be cleaned? (logical)}
\item{TZ}{time zone given to the output datetimes, defaults to \code{"UTC"}(recommended)}
}
\value{
A \code{data.frame} containing the profile data
......@@ -32,7 +34,7 @@ If \code{keep} contains names not found in the header, it will add a column of \
}
\examples{
\dontrun{
bbe <- read_bbe(Ts = df[,2], Tb = df[,ncol(df)], dates = df[,1])
ixx <- read_ixx(add_later, ...)
}
}
......
......@@ -16,7 +16,7 @@ numeric vector the same length as \code{t}
Calculates the density of fresh water.
}
\details{
Calculates the density from temperature \link{kg m^-3} using the formula of Millero & Poisson (1981).
Calculates the density from temperature (kg m^-3) using the formula of Millero & Poisson (1981).
this is the method stated in the isimip 2b protocol in July 2019
}
\examples{
......
......@@ -23,7 +23,7 @@ strat_phenology(
\item{dates}{The dates corresponding to the temperature measurements in POSIX style and same length as \code{Ts}.}
\item{thresh}{The density or temperature threshold used to define the presence of stratification, ie whether the difference between Ts and Tb exceeds this threshold. If \code{bydensity} is \code{TRUE}, then \code{thresh} must be in \link{kg m^-3}, and \code{Ts} and \code{Tb} must be in Celsius.}
\item{thresh}{The density or temperature threshold used to define the presence of stratification, ie whether the difference between Ts and Tb exceeds this threshold. If \code{bydensity} is \code{TRUE}, then \code{thresh} must be in (kg m^-3), and \code{Ts} and \code{Tb} must be in Celsius.}
\item{NH}{Is the lake in the northern hemisphere? (logical)}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment