aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-10-10 09:21:46 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2019-10-10 09:21:46 +0200
commita5503d3e26408f7308a7bf4da617205b93d17422 (patch)
tree58df924ff44ffb9cccc4d4d864e7eb44e036844e
parenta5e458ecb33ae87e46b2237174a194f6252a97cf (diff)
Fix documentation for set_nd
-rw-r--r--R/set_nd.R10
-rw-r--r--docs/reference/index.html11
-rw-r--r--docs/reference/set_nd.html47
-rw-r--r--man/set_nd.Rd19
4 files changed, 26 insertions, 61 deletions
diff --git a/R/set_nd.R b/R/set_nd.R
index 5d98940..10c5cba 100644
--- a/R/set_nd.R
+++ b/R/set_nd.R
@@ -1,5 +1,5 @@
#' Set non-detects in residue series without replicates
-
+#'
#' Sets non-detects directly before or directly after detects to NA. Values between
#' lod and loq are set to their mean value if an loq is specified.
#' If 'time_zero' is set to TRUE, the residue series is assumed to start with time
@@ -9,7 +9,7 @@
#' If stopping after the first non-detection is requested, as in in the FOCUS
#' variant of the function, an loq has to be specified in order to decide
#' if any later detections are above the loq.
-
+#'
#' @param r A character vector of sequential residues without replicates, with
#' non-detects specified as 'nd' and unquantified values above the limit of
#' detection specified as 'nq', otherwise coercible to numeric
@@ -19,9 +19,13 @@
#' @param time_zero Is the first value in the series a time zero value?
#' @param time_zero_nd_value Which value should we use for non-detects at time zero?
#' @param stop_after_first_nondetect Should we really stop after the first non-detection?
-#' @references FOCUS (2014) p. 75, 76, 131, 132
+#' @references FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation
+#' Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1,
+#' 18 December 2014, p. 251
+#' @describeIn set_nd Set non-detects in residues series
#' @export
#' @examples
+#' # FOCUS (2014) p. 75/76 and 131/132
#' parent_1 <- c(.12, .09, .05, .03, "nd", "nd", "nd", "nd", "nd", "nd")
#' set_nd(parent_1, 0.02)
#' parent_2 <- c(.12, .09, .05, .03, "nd", "nd", .03, "nd", "nd", "nd")
diff --git a/docs/reference/index.html b/docs/reference/index.html
index a704ad0..455ee07 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -172,16 +172,7 @@
<td>
<p><code><a href="set_nd.html">set_nd()</a></code> <code><a href="set_nd.html">set_nd_focus()</a></code> </p>
</td>
- <td><p>Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
-lod and loq are set to their mean value if an loq is specified.
-If 'time_zero' is set to TRUE, the residue series is assumed to start with time
-zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
-set_nd_focus variant, this is zero, otherwise this argument has NA as default
-value.
-If stopping after the first non-detection is requested, as in in the FOCUS
-variant of the function, an loq has to be specified in order to decide
-if any later detections are above the loq.</p></td>
+ <td><p>Set non-detects in residue series without replicates</p></td>
</tr>
</tbody><tbody>
<tr>
diff --git a/docs/reference/set_nd.html b/docs/reference/set_nd.html
index 32ac155..75a8fb1 100644
--- a/docs/reference/set_nd.html
+++ b/docs/reference/set_nd.html
@@ -6,16 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
-lod and loq are set to their mean value if an loq is specified.
-If 'time_zero' is set to TRUE, the residue series is assumed to start with time
-zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
-set_nd_focus variant, this is zero, otherwise this argument has NA as default
-value.
-If stopping after the first non-detection is requested, as in in the FOCUS
-variant of the function, an loq has to be specified in order to decide
-if any later detections are above the loq. — set_nd • pfm</title>
+<title>Set non-detects in residue series without replicates — set_nd • pfm</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
@@ -41,19 +32,9 @@ if any later detections are above the loq. — set_nd • pfm</title>
-<meta property="og:title" content="Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
-lod and loq are set to their mean value if an loq is specified.
-If 'time_zero' is set to TRUE, the residue series is assumed to start with time
-zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
-set_nd_focus variant, this is zero, otherwise this argument has NA as default
-value.
-If stopping after the first non-detection is requested, as in in the FOCUS
-variant of the function, an loq has to be specified in order to decide
-if any later detections are above the loq. — set_nd" />
+<meta property="og:title" content="Set non-detects in residue series without replicates — set_nd" />
-<meta property="og:description" content="Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
+<meta property="og:description" content="Sets non-detects directly before or directly after detects to NA. Values between
lod and loq are set to their mean value if an loq is specified.
If 'time_zero' is set to TRUE, the residue series is assumed to start with time
zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
@@ -125,24 +106,14 @@ if any later detections are above the loq." />
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
- <h1>Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
-lod and loq are set to their mean value if an loq is specified.
-If 'time_zero' is set to TRUE, the residue series is assumed to start with time
-zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
-set_nd_focus variant, this is zero, otherwise this argument has NA as default
-value.
-If stopping after the first non-detection is requested, as in in the FOCUS
-variant of the function, an loq has to be specified in order to decide
-if any later detections are above the loq.</h1>
+ <h1>Set non-detects in residue series without replicates</h1>
<div class="hidden name"><code>set_nd.Rd</code></div>
</div>
<div class="ref-description">
- <p>Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
+ <p>Sets non-detects directly before or directly after detects to NA. Values between
lod and loq are set to their mean value if an loq is specified.
If 'time_zero' is set to TRUE, the residue series is assumed to start with time
zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
@@ -195,16 +166,20 @@ stop after the first non-detection is to be applied</p></td>
<ul>
+<li><p><code>set_nd</code>: Set non-detects in residues series</p></li>
<li><p><code>set_nd_focus</code>: Set non-detects in residues series according to FOCUS rules</p></li>
</ul>
<h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
- <p>FOCUS (2014) p. 75, 76, 131, 132</p>
+ <p>FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation
+ Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1,
+ 18 December 2014, p. 251</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='no'>parent_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>.12</span>, <span class='fl'>.09</span>, <span class='fl'>.05</span>, <span class='fl'>.03</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>)
+ <pre class="examples"><div class='input'><span class='co'># FOCUS (2014) p. 75/76 and 131/132</span>
+<span class='no'>parent_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>.12</span>, <span class='fl'>.09</span>, <span class='fl'>.05</span>, <span class='fl'>.03</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>)
<span class='fu'>set_nd</span>(<span class='no'>parent_1</span>, <span class='fl'>0.02</span>)</div><div class='output co'>#&gt; [1] 0.12 0.09 0.05 0.03 0.01 NA NA NA NA NA</div><div class='input'><span class='no'>parent_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>.12</span>, <span class='fl'>.09</span>, <span class='fl'>.05</span>, <span class='fl'>.03</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='fl'>.03</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>)
<span class='fu'>set_nd</span>(<span class='no'>parent_2</span>, <span class='fl'>0.02</span>)</div><div class='output co'>#&gt; [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.03 0.01 NA NA</div><div class='input'><span class='fu'>set_nd_focus</span>(<span class='no'>parent_2</span>, <span class='fl'>0.02</span>, <span class='kw'>loq</span> <span class='kw'>=</span> <span class='fl'>0.05</span>)</div><div class='output co'>#&gt; [1] 0.12 0.09 0.05 0.03 0.01 NA NA NA NA NA</div><div class='input'><span class='no'>parent_3</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>.12</span>, <span class='fl'>.09</span>, <span class='fl'>.05</span>, <span class='fl'>.03</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='fl'>.06</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>)
<span class='fu'>set_nd</span>(<span class='no'>parent_3</span>, <span class='fl'>0.02</span>)</div><div class='output co'>#&gt; [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.06 0.01 NA NA</div><div class='input'><span class='fu'>set_nd_focus</span>(<span class='no'>parent_3</span>, <span class='fl'>0.02</span>, <span class='kw'>loq</span> <span class='kw'>=</span> <span class='fl'>0.05</span>)</div><div class='output co'>#&gt; [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.06 0.01 NA NA</div><div class='input'><span class='no'>metabolite</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>, <span class='fl'>0.03</span>, <span class='fl'>0.06</span>, <span class='fl'>0.10</span>, <span class='fl'>0.11</span>, <span class='fl'>0.10</span>, <span class='fl'>0.09</span>, <span class='fl'>0.05</span>, <span class='fl'>0.03</span>, <span class='st'>"nd"</span>, <span class='st'>"nd"</span>)
diff --git a/man/set_nd.Rd b/man/set_nd.Rd
index 8c6003c..bdbc6d2 100644
--- a/man/set_nd.Rd
+++ b/man/set_nd.Rd
@@ -3,16 +3,7 @@
\name{set_nd}
\alias{set_nd}
\alias{set_nd_focus}
-\title{Set non-detects in residue series without replicates
-Sets non-detects directly before or directly after detects to NA. Values between
-lod and loq are set to their mean value if an loq is specified.
-If 'time_zero' is set to TRUE, the residue series is assumed to start with time
-zero, and non-detects at time zero are set to 'time_zero_nd_value'. For the
-set_nd_focus variant, this is zero, otherwise this argument has NA as default
-value.
-If stopping after the first non-detection is requested, as in in the FOCUS
-variant of the function, an loq has to be specified in order to decide
-if any later detections are above the loq.}
+\title{Set non-detects in residue series without replicates}
\usage{
set_nd(r, lod, loq = NA, time_zero = TRUE, time_zero_nd_value = NA,
stop_after_first_nondetect = FALSE)
@@ -36,7 +27,6 @@ stop after the first non-detection is to be applied}
\item{stop_after_first_nondetect}{Should we really stop after the first non-detection?}
}
\description{
-Set non-detects in residue series without replicates
Sets non-detects directly before or directly after detects to NA. Values between
lod and loq are set to their mean value if an loq is specified.
If 'time_zero' is set to TRUE, the residue series is assumed to start with time
@@ -49,10 +39,13 @@ if any later detections are above the loq.
}
\section{Functions}{
\itemize{
+\item \code{set_nd}: Set non-detects in residues series
+
\item \code{set_nd_focus}: Set non-detects in residues series according to FOCUS rules
}}
\examples{
+# FOCUS (2014) p. 75/76 and 131/132
parent_1 <- c(.12, .09, .05, .03, "nd", "nd", "nd", "nd", "nd", "nd")
set_nd(parent_1, 0.02)
parent_2 <- c(.12, .09, .05, .03, "nd", "nd", .03, "nd", "nd", "nd")
@@ -65,5 +58,7 @@ metabolite <- c("nd", "nd", "nd", 0.03, 0.06, 0.10, 0.11, 0.10, 0.09, 0.05, 0.03
set_nd(metabolite, 0.02)
}
\references{
-FOCUS (2014) p. 75, 76, 131, 132
+FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation
+ Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1,
+ 18 December 2014, p. 251
}

Contact - Imprint