From 0067297d515dff8cdd38875019436d3d48f745c4 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Mon, 18 Jul 2022 11:35:57 +0200 Subject: [PATCH] Get rid of warnings and notes in R CMD check Closes #162 --- DESCRIPTION | 5 ++++- R/global-vars.R | 17 +++++++++++++++++ man/ObsVsPredDataMapping.Rd | 25 ++++++++++++++++++++++++- man/PKRatioDataMapping.Rd | 22 +++++++++++----------- man/ResVsPredDataMapping.Rd | 4 ++-- man/ResVsTimeDataMapping.Rd | 4 ++-- man/dot-removeInfiniteValues.Rd | 4 +++- 7 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 R/global-vars.R diff --git a/DESCRIPTION b/DESCRIPTION index ba66ff96..3ea84519 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -32,7 +32,7 @@ Imports: ggplot2 (>= 3.3.0), R6, jsonlite, - ospsuite.utils, + ospsuite.utils (>= 1.3.0), patchwork Depends: R (>= 3.6) @@ -42,6 +42,8 @@ Roxygen: list(markdown = TRUE) Suggests: knitr, rmarkdown, + scales, + shiny, testthat (>= 3.0.3), vdiffr (>= 1.0.0) VignetteBuilder: knitr @@ -61,6 +63,7 @@ Collate: 'ddiratio-datamapping.R' 'error-checks.R' 'font.R' + 'global-vars.R' 'histogram-datamapping.R' 'label.R' 'messages.R' diff --git a/R/global-vars.R b/R/global-vars.R new file mode 100644 index 00000000..b819c924 --- /dev/null +++ b/R/global-vars.R @@ -0,0 +1,17 @@ +# defining global variables and functions to appease R CMD Check + +utils::globalVariables( + names = c( + ".", + "color", + "fill", + "fillLength", + "linetype", + "linetypeLength", + "newPlotObject", + "shape", + "size" + ), + package = "tlf", + add = FALSE +) diff --git a/man/ObsVsPredDataMapping.Rd b/man/ObsVsPredDataMapping.Rd index 23aa86b4..e7f1d01e 100644 --- a/man/ObsVsPredDataMapping.Rd +++ b/man/ObsVsPredDataMapping.Rd @@ -44,13 +44,13 @@ Other DataMapping classes: \subsection{Public methods}{ \itemize{ \item \href{#method-ObsVsPredDataMapping-new}{\code{ObsVsPredDataMapping$new()}} +\item \href{#method-ObsVsPredDataMapping-checkMapData}{\code{ObsVsPredDataMapping$checkMapData()}} \item \href{#method-ObsVsPredDataMapping-clone}{\code{ObsVsPredDataMapping$clone()}} } } \if{html}{\out{
Inherited methods
}} @@ -96,6 +96,29 @@ A new \code{ObsVsPredDataMapping} object } } \if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ObsVsPredDataMapping-checkMapData}{}}} +\subsection{Method \code{checkMapData()}}{ +Check that \code{data} variables include map variables +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{ObsVsPredDataMapping$checkMapData(data, metaData = NULL)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{data}}{data.frame to check} + +\item{\code{metaData}}{list containing information on \code{data}} +} +\if{html}{\out{
}} +} +\subsection{Returns}{ +A data.frame with map and \code{defaultAes} variables. +Dummy variable \code{defaultAes} is necessary to allow further modification of plots. +} +} +\if{html}{\out{
}} \if{html}{\out{}} \if{latex}{\out{\hypertarget{method-ObsVsPredDataMapping-clone}{}}} \subsection{Method \code{clone()}}{ diff --git a/man/PKRatioDataMapping.Rd b/man/PKRatioDataMapping.Rd index 03a4d1ed..fb9b5807 100644 --- a/man/PKRatioDataMapping.Rd +++ b/man/PKRatioDataMapping.Rd @@ -41,20 +41,20 @@ Other DataMapping classes: \section{Methods}{ \subsection{Public methods}{ \itemize{ -\item \href{#method-new}{\code{PKRatioDataMapping$new()}} -\item \href{#method-checkMapData}{\code{PKRatioDataMapping$checkMapData()}} -\item \href{#method-clone}{\code{PKRatioDataMapping$clone()}} +\item \href{#method-PKRatioDataMapping-new}{\code{PKRatioDataMapping$new()}} +\item \href{#method-PKRatioDataMapping-checkMapData}{\code{PKRatioDataMapping$checkMapData()}} +\item \href{#method-PKRatioDataMapping-clone}{\code{PKRatioDataMapping$clone()}} } } -\if{html}{ -\out{
Inherited methods} -\itemize{ -} -\out{
} -} +\if{html}{\out{ +
Inherited methods + +
+}} \if{html}{\out{
}} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-PKRatioDataMapping-new}{}}} \subsection{Method \code{new()}}{ Create a new \code{PKRatioDataMapping} object \subsection{Usage}{ diff --git a/man/ResVsPredDataMapping.Rd b/man/ResVsPredDataMapping.Rd index c8517c5d..05e046f6 100644 --- a/man/ResVsPredDataMapping.Rd +++ b/man/ResVsPredDataMapping.Rd @@ -25,7 +25,7 @@ Other DataMapping classes: } \concept{DataMapping classes} \section{Super classes}{ -\code{\link[tlf:XYDataMapping]{tlf::XYDataMapping}} -> \code{\link[tlf:XYGDataMapping]{tlf::XYGDataMapping}} -> \code{\link[tlf:PKRatioDataMapping]{tlf::PKRatioDataMapping}} -> \code{\link[tlf:ObsVsPredDataMapping]{tlf::ObsVsPredDataMapping}} -> \code{ResVsPredDataMapping} +\code{\link[tlf:XYDataMapping]{tlf::XYDataMapping}} -> \code{\link[tlf:XYGDataMapping]{tlf::XYGDataMapping}} -> \code{\link[tlf:ObsVsPredDataMapping]{tlf::ObsVsPredDataMapping}} -> \code{ResVsPredDataMapping} } \section{Methods}{ \subsection{Public methods}{ @@ -36,7 +36,7 @@ Other DataMapping classes: \if{html}{\out{
Inherited methods
diff --git a/man/ResVsTimeDataMapping.Rd b/man/ResVsTimeDataMapping.Rd index e2dad620..9a769fe7 100644 --- a/man/ResVsTimeDataMapping.Rd +++ b/man/ResVsTimeDataMapping.Rd @@ -25,7 +25,7 @@ Other DataMapping classes: } \concept{DataMapping classes} \section{Super classes}{ -\code{\link[tlf:XYDataMapping]{tlf::XYDataMapping}} -> \code{\link[tlf:XYGDataMapping]{tlf::XYGDataMapping}} -> \code{\link[tlf:PKRatioDataMapping]{tlf::PKRatioDataMapping}} -> \code{\link[tlf:ObsVsPredDataMapping]{tlf::ObsVsPredDataMapping}} -> \code{\link[tlf:ResVsPredDataMapping]{tlf::ResVsPredDataMapping}} -> \code{ResVsTimeDataMapping} +\code{\link[tlf:XYDataMapping]{tlf::XYDataMapping}} -> \code{\link[tlf:XYGDataMapping]{tlf::XYGDataMapping}} -> \code{\link[tlf:ObsVsPredDataMapping]{tlf::ObsVsPredDataMapping}} -> \code{\link[tlf:ResVsPredDataMapping]{tlf::ResVsPredDataMapping}} -> \code{ResVsTimeDataMapping} } \section{Methods}{ \subsection{Public methods}{ @@ -36,7 +36,7 @@ Other DataMapping classes: \if{html}{\out{
Inherited methods
diff --git a/man/dot-removeInfiniteValues.Rd b/man/dot-removeInfiniteValues.Rd index 004f2642..9acead25 100644 --- a/man/dot-removeInfiniteValues.Rd +++ b/man/dot-removeInfiniteValues.Rd @@ -12,6 +12,8 @@ \item{range}{numeric vector of length two giving desired output range} } \description{ -Censor any values outside of range +Censor/remove any values outside of range +Caution, removing infinite values can cause issues with ribbons +which can use such infinite values for filling a range } \keyword{internal}