aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2015-10-19 16:10:34 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2015-10-19 16:10:34 +0200
commit2ded0424ba1a2ad6d6e265dd785b9c5f54d53319 (patch)
tree0b91bdf92765bd2c0a1f4982b3df784ae46fc89d
parent76084872526d7c6fc6a48e893c8240b323d61a87 (diff)
Add the R6 class mkinds
-rw-r--r--DESCRIPTION2
-rw-r--r--NAMESPACE1
-rw-r--r--NEWS.md6
-rw-r--r--R/mkinds.R2
-rw-r--r--inst/examples/mkinds.R1
-rw-r--r--man/mkinds.Rd34
-rw-r--r--man/print.mkinds.Rd19
7 files changed, 61 insertions, 4 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index 8aba93d1..8809b02d 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -18,7 +18,7 @@ Description: Calculation routines based on the FOCUS Kinetics Report (2006).
Please note that no warranty is implied for correctness of results or fitness
for a particular purpose.
Depends: minpack.lm, rootSolve, inline, parallel
-Imports: stats, graphics, methods, FME, deSolve
+Imports: stats, graphics, methods, FME, deSolve, R6
Suggests: knitr, testthat, microbenchmark
License: GPL
LazyLoad: yes
diff --git a/NAMESPACE b/NAMESPACE
index 87d27717..a37bad8c 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -18,3 +18,4 @@ import(
)
importFrom(deSolve, ode)
importFrom(methods, signature)
+importFrom(R6, R6Class)
diff --git a/NEWS.md b/NEWS.md
index 1f0fdab7..e2b98d91 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,12 +4,14 @@
### Minor changes
+- Add an R6 class `mkinds` representing datasets with a printing method
+
+- Add a printing method for mkinmod objects
+
- Make it possible to specify arbitrary strings as names for the compounds in `mkinmod`, and show them in the plot
- Use an index.r file to group help topics in static documentation
-- Add a printing method for mkinmod objects
-
## mkin 0.9-40 (2015-07-21)
### Bug fixes
diff --git a/R/mkinds.R b/R/mkinds.R
index 17d40875..b86751fb 100644
--- a/R/mkinds.R
+++ b/R/mkinds.R
@@ -30,7 +30,7 @@
#' @field replicates The number of replicates
#' @field data A dataframe with at least the columns name, time and value
#' in order to be compatible with mkinfit
-#' @examples inst/examples/mkinds.R
+#' @example inst/examples/mkinds.R
mkinds <- R6Class("mkinds",
public = list(
title = NULL,
diff --git a/inst/examples/mkinds.R b/inst/examples/mkinds.R
new file mode 100644
index 00000000..6c5d2cfc
--- /dev/null
+++ b/inst/examples/mkinds.R
@@ -0,0 +1 @@
+mds <- mkinds$new("FOCUS A", FOCUS_2006_A)
diff --git a/man/mkinds.Rd b/man/mkinds.Rd
new file mode 100644
index 00000000..239ab328
--- /dev/null
+++ b/man/mkinds.Rd
@@ -0,0 +1,34 @@
+\docType{class}
+\name{mkinds}
+\alias{mkinds}
+\title{A dataset class for mkin}
+\format{An \code{\link{R6Class}} generator object.}
+\usage{
+mkinds
+}
+\description{
+A dataset class for mkin
+}
+\section{Fields}{
+
+\describe{
+\item{\code{title}}{A full title for the dataset}
+
+\item{\code{sampling}}{times The sampling times}
+
+\item{\code{time_unit}}{The time unit}
+
+\item{\code{observed}}{Names of the observed compounds}
+
+\item{\code{unit}}{The unit of the observations}
+
+\item{\code{replicates}}{The number of replicates}
+
+\item{\code{data}}{A dataframe with at least the columns name, time and value
+in order to be compatible with mkinfit}
+}}
+\examples{
+mds <- mkinds$new("FOCUS A", FOCUS_2006_A)
+}
+\keyword{datasets}
+
diff --git a/man/print.mkinds.Rd b/man/print.mkinds.Rd
new file mode 100644
index 00000000..e7acf30d
--- /dev/null
+++ b/man/print.mkinds.Rd
@@ -0,0 +1,19 @@
+\name{print.mkinds}
+\alias{print.mkinds}
+\title{
+ Print mkinds objects
+}
+\description{
+ Print mkinds objects.
+}
+\usage{
+\method{print}{mkinds}(x, ...)
+}
+\arguments{
+ \item{x}{
+ An \code{\link{mkinds}} object.
+ }
+ \item{\dots}{
+ Not used.
+ }
+}

Contact - Imprint