}}\preformatted{Container$add(value, name = NULL)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{value}}{value of \code{ANY} type to be added to the \code{Container}.}
-
-\item{\code{name}}{\code{character} optional name attribute of the value.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-at}{}}}
-\subsection{Method \code{at()}}{
-Same as \code{at2} (see below) but accepts a vector of
-indices and always returns a \code{Container} object.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{vector of indices.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{Container} object with the extracted elements.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-at2}{}}}
-\subsection{Method \code{at2()}}{
-Extract value at index. If index is invalid or not
-found, an error is signaled. If given as a string, the element
-matching the name is returned. If there are two or more identical
-names, the value of the first match (i.e. \emph{leftmost} element) is
-returned.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{Must be a single number > 0 or a string.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-If given as a number, the element at the corresponding
-position, and if given as a string, the element at the
-corresponding name matching the given string is returned.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-clear}{}}}
-\subsection{Method \code{clear()}}{
-delete all elements from the \code{Container}
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Container$clear()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-the cleared \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-count}{}}}
-\subsection{Method \code{count()}}{
-Count number of element occurences.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{elem}}{element to be counted.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{integer} number of \code{elem} occurences in the \code{\link[=Container]{Container()}}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-delete}{}}}
-\subsection{Method \code{delete()}}{
-Search for occurence(s) of \code{elem} in \code{Container} and
-remove first one that is found. If \code{elem} does not exist, an error
-is signaled.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{elem}}{element to be removed from the \code{Container}.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-delete_at}{}}}
-\subsection{Method \code{delete_at()}}{
-Delete value at given index. If index is not found, an
-error is signaled.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{\code{character} or \code{numeric} index}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-discard}{}}}
-\subsection{Method \code{discard()}}{
-Search for occurence(s) of \code{elem} in \code{Container} and
-remove first one that is found.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{elem}}{element to be discarded from the \code{Container}. If not
-found, the operation is ignored and the object is \emph{not} altered.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-discard_at}{}}}
-\subsection{Method \code{discard_at()}}{
-Discard value at given index. If index is not found,
-the operation is ignored.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{\code{character} or \code{numeric} index}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-empty}{}}}
-\subsection{Method \code{empty()}}{
-This function is deprecated. Use \code{\link[=is_empty]{is_empty()}} instead.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Container$empty()}\if{html}{\out{
}}
-}
-
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-get_compare_fun}{}}}
-\subsection{Method \code{get_compare_fun()}}{
-Get comparison function used internally by the
-\code{Container} object to compare elements.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{elem}}{element to search for}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{TRUE} if \code{Container} contains \code{elem} else \code{FALSE}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-has_name}{}}}
-\subsection{Method \code{has_name()}}{
-Determine if \code{Container} object contains an element
-with the given name. If called with no argument, the function
-determines whether \emph{any} element is named.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{name}}{\code{character} the name}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{TRUE} if \code{Container} has the \code{name} otherwise \code{FALSE}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-is_empty}{}}}
-\subsection{Method \code{is_empty()}}{
-Check if \code{Container} is empty
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-\code{TRUE} if the \code{Container} is empty else \code{FALSE}.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-length}{}}}
-\subsection{Method \code{length()}}{
-Number of elements of the \code{Container}.
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-\code{integer} length of the \code{Container}, that is, the number of
-elements it contains.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-names}{}}}
-\subsection{Method \code{names()}}{
-Names of the elements.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Container$names()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-\code{character} the names of the elements contained in \code{x}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-peek_at}{}}}
-\subsection{Method \code{peek_at()}}{
-Same as \code{peek_at2} (see below) but accepts a vector of
-indices and always returns a \code{Container} object.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{vector of indices.}
-
-\item{\code{default}}{the default value to return in case the value at
-\code{index} is not found.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{Container} object with the extracted elements.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-peek_at2}{}}}
-\subsection{Method \code{peek_at2()}}{
-Peek at index and extract value. If index is invalid,
-missing, or not not found, return \code{default} value.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{\code{numeric} or \code{character} index to be accessed.}
-
-\item{\code{default}}{the default value to return in case the value at
-\code{index} is not found.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the value at the given index or (if not found) the given
-default value.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-pop}{}}}
-\subsection{Method \code{pop()}}{
-Get value at index and remove it from \code{Container}.
-If \code{index} is not found, raise an error.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{Must be a single number > 0 or a string.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-If given as a number, the element at the corresponding
-position, and if given as a string, the element at the
-corresponding name matching the given string is returned.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-print}{}}}
-\subsection{Method \code{print()}}{
-Print object representation
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{...}}{further arguments passed to \code{\link[=format]{format()}}}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-invisibly returns the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-rename}{}}}
-\subsection{Method \code{rename()}}{
-Rename a \code{key} in the \code{Container}. An error is signaled,
-if either the \code{old} key is not in the \code{Container} or the \code{new} key results
-in a name-clash with an existing key.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{old}}{\code{character} name of key to be renamed.}
-
-\item{\code{new}}{\code{character} new key name.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-replace}{}}}
-\subsection{Method \code{replace()}}{
-Replace one element by another element.
-Search for occurence of \code{old} and, if found, replace it by \code{new}.
-If \code{old} does not exist, an error is signaled, unless \code{add} was
-set to \code{TRUE}, in which case \code{new} is added.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{old}}{element to be replaced}
-
-\item{\code{new}}{element to be put instead of old}
-
-\item{\code{add}}{\code{logical} if \code{TRUE} the \code{new} element is added in case
-\code{old} does not exists.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-replace_at}{}}}
-\subsection{Method \code{replace_at()}}{
-Replace value at given index.
-Replace value at index by given value. If index is not found, an
-error is signalled, unless \code{add} was set to \code{TRUE}, in which case
-\code{new} is added.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{\code{character} or \code{numeric} index}
-
-\item{\code{value}}{\code{ANY} new value to replace the old one.}
-
-\item{\code{add}}{\code{logical} if \code{TRUE} the new \code{value} element would be added
-in case \code{index} did not exists.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-remove}{}}}
-\subsection{Method \code{remove()}}{
-This function is deprecated. Use \code{\link[=delete]{delete()}} instead.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{elem}}{element to be deleted from the \code{Container}. If element
-is not found in the \code{Container}, an error is signaled.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Container} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-size}{}}}
-\subsection{Method \code{size()}}{
-This function is deprecated. Use \code{\link[=length]{length()}} instead.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Container$size()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-the \code{Container} length
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-type}{}}}
-\subsection{Method \code{type()}}{
-This function is deprecated and of no real use anymore.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Container$type()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-type (or mode) of internal vector containing the elements
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-update}{}}}
-\subsection{Method \code{update()}}{
-Add elements of \code{other} to this if the name is
-not in the \code{Container} and update elements with existing names.
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-elements of the container as a base list
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Container-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{deep}}{Whether to make a deep clone.}
-}
-\if{html}{\out{
}}
-}
-}
-}
diff --git a/ContainerS3.Rd b/ContainerS3.Rd
deleted file mode 100644
index 9362e9be..00000000
--- a/ContainerS3.Rd
+++ /dev/null
@@ -1,418 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-ContainerS3.R, R/GroupGenericMath.R,
-% R/GroupGenericSummary.R, R/Ops-arithmetic.R, R/Ops-compare.R,
-% R/Ops-extract.R, R/Ops-replace.R, R/add.R, R/at.R, R/at2.R, R/clear.R,
-% R/clone.R, R/count.R, R/delete.R, R/delete_at.R, R/discard.R,
-% R/discard_at.R, R/has.R, R/has_name.R, R/is_empty.R, R/peek_at.R,
-% R/peek_at2.R, R/pop.R, R/rename.R, R/replace.R, R/replace_at.R
-\name{ContainerS3}
-\alias{ContainerS3}
-\alias{container}
-\alias{cont}
-\alias{as.container}
-\alias{as.cont}
-\alias{is.container}
-\alias{as.list.Container}
-\alias{length.Container}
-\alias{names.Container}
-\alias{names<-.Container}
-\title{Container - Enhancing R's list}
-\usage{
-container(...)
-
-cont(...)
-
-as.container(x)
-
-as.cont(x)
-
-is.container(x)
-
-\method{as.list}{Container}(x, ...)
-
-\method{length}{Container}(x)
-
-\method{names}{Container}(x)
-
-\method{names}{Container}(x) <- value
-}
-\arguments{
-\item{...}{(possibly named) elements to be put into or removed from the
-\link{Container}, or additional arguments passed from and to methods.}
-
-\item{x}{\code{R} object of \code{ANY} type for \link{as.container} and \link{is.container}
-or of class \link{Container} for the \code{S3} methods.}
-
-\item{value}{\code{character} vector of names.}
-}
-\description{
-A container is a data structure with typical member
-functions to insert, delete and access elements from the container
-object. It can be considered as a base R \link{list} with
-extended functionality. The \link{Container} class also serves as the base
-class for \link{Deque}, \link{Set}, and \link{Dict} objects.
-}
-\details{
-Methods that alter \link{Container} objects usually come in two versions
-providing either copy or reference semantics where the latter start with
-\code{'ref_'} to note the reference semantic, for example, \code{\link[=add]{add()}} and \code{\link[=ref_add]{ref_add()}}.
-
-\itemize{
-\item \code{container(...)} initializes and returns a \link{Container} object.
-}
-
-\itemize{
-\item \code{cont(...)} is a short cut for \code{container(...)}.
-}
-
-\itemize{
-\item \code{as.container(x)} or \code{as.cont(x)} coerce \code{x} to a \link{Container}
-}
-
-\itemize{
-\item \code{is.container(x)} check if \code{x} is a \link{Container}
-}
-
-\itemize{
-\item \code{as.list(x)} converts container \code{x} to a base R \link{list}. All of
-the container's elements are copied (deeply) during the conversion.
-}
-
-\itemize{
-\item \code{length(x)} return the number of elements contained in \code{x}.
-}
-
-\itemize{
-\item \code{names(x)} return the names of the elements contained in \code{x}.
-}
-
-\itemize{
-\item \code{names(x) <- value} sets the names of \code{x}.
-}
-
-\itemize{
-\item \code{x + y} combines \code{x} and \code{y} into a new container by appending \code{y}
-to \code{x}.
-}
-
-\itemize{
-\item \code{x - y} element-wise discards all items of \code{y} from \code{x}, given
-the element was contained in \code{x}. The result is always a container.
-}
-
-\itemize{
-\item \code{x == y} is \code{TRUE} if the contents of \code{x} and \code{y} are
-lexicographically \emph{equal}.
-}
-
-\itemize{
-\item \code{x != y} is \code{TRUE} if the contents of \code{x} and \code{y} are
-not equal.
-}
-
-\itemize{
-\item \code{x < y} is \code{TRUE} if the contents of x are lexicographically
-\emph{less} than the contents of y.
-}
-
-\itemize{
-\item \code{x <= y} is \code{TRUE} if the contents of x are lexicographically
-\emph{less} than or \emph{equal} to the contents of y.
-}
-
-\itemize{
-\item \code{add(.x, ...)} and \code{ref_add(.x, ...)} add elements to \code{.x}.
-}
-
-\itemize{
-\item \code{at(.x, ...,)} returns the value at the given indices. Indices
-can be letters or numbers or both. All indices must exist.
-}
-
-\itemize{
-\item \code{at2(x, index)} returns the value at the given index or signals an error
-if not found.
-}
-
-\itemize{
-\item \code{clear(x)} and \code{ref_clear(x)} remove all elements from \code{x}.
-}
-
-\itemize{
-\item \code{clone(x)} create a copy of \code{x}.
-}
-
-\itemize{
-\item \code{count(x, elem)} count how often \code{elem} occurs in \code{x}.
-}
-
-\itemize{
-\item \code{delete(.x, ...)} and \code{ref_delete(.x, ...)} find and remove elements.
-If one or more elements don't exist, an error is signaled.
-}
-
-\itemize{
-\item \code{delete_at(.x, ...)} and \code{ref_delete_at(.x, ...)} find and remove values at
-given indices. If any given index is invalid, an error is signaled.
-}
-
-\itemize{
-\item \code{discard(.x, ...)} and \code{ref_discard(.x, ...)} find and discard elements.
-Elements that don't exist, are ignored.
-}
-
-\itemize{
-\item \code{discard_at(.x, ...)} and \code{ref_discard_at(.x, ...)} find and discard values
-at given indices. Invalid indices are ignored.
-}
-
-\itemize{
-\item \code{has(x, elem)} \code{TRUE} if element is in \code{x} and otherwise \code{FALSE}.
-}
-
-\itemize{
-\item \code{has_name(x, name)} check if \code{name} is in \code{x}
-}
-
-\itemize{
-\item \code{is_empty(x)} \code{TRUE} if object is empty otherwise \code{FALSE}
-}
-
-\itemize{
-\item \code{peek_at(x, ..., .default = NULL)} returns the value at the given indices
-or (if not found) the given default value.
-}
-
-\itemize{
-\item \code{peek_at2(x, index, default)} returns the value at the given index or (if
-not found) the given default value.
-}
-
-\itemize{
-\item \code{ref_pop(.x, index)} return element at given index and remove it
-from the \code{container} object.
-}
-
-\itemize{
-\item \code{rename(.x, old, new)} and \code{ref_rename(.x, old, new)} rename one or more keys
-from \code{old} to \code{new}, respectively, by copy and in place (i.e. by reference).
-}
-
-\itemize{
-\item \code{replace(.x, old, new, add = FALSE)} and
-\code{ref_replace(.x, old, new, add = FALSE)} try to find element \code{old} and
-replace it with element \code{new}. If \code{old} does not exist, an error is raised,
-unless \code{add} was set to \code{TRUE}.
-}
-
-\itemize{
-\item \code{replace_at(.x, .., .add = FALSE)} and \code{ref_replace_at(.x, ..., .add = FALSE)}
-replace values at given indices. If a given index is invalid, an error is
-signaled unless \code{.add} was set to \code{TRUE}.
-}
-}
-\examples{
-co = container(1:5, c = container("a", 1), l = list())
-is.container(co)
-print(co)
-length(co)
-names(co)
-
-unpack(co) # flatten recursively similar to unlist
-
-# Math
-co = container(1, 2, -(3:5))
-co
-abs(co)
-cumsum(co)
-round(co)
-exp(co)
-
-# Summary
-range(co)
-min(co)
-max(co)
-
-# Arithmetic
-c1 = container(1, 1:2)
-c2 = container(2, 1:2)
-c1 + c2 # same as c(c1, c2)
-c2 + c1 # same as c(c2, c1)
-
-c1 - c2
-c2 - c1
-c1 - c1
-
-# Comparison
-c1 = container(1, 2, 3)
-c2 = container(1, 3, 2)
-c1 == c1 # TRUE
-c1 != c2 # TRUE
-c1 <= c1 # TRUE
-c1 == c2 # FALSE
-c1 < c2 # TRUE
-c1 < container(2) # TRUE
-c1 < container() # FALSE
-
-# Extract or replace
-co = container(a = 1, b = 2, c = 3, d = 4)
-co[1:2]
-co[1, 4]
-co["d", 2]
-co[list("d", 2)]
-co[0:10]
-
-co = container(a = 1, b = 2)
-co[[1]]
-co[["a"]]
-co[["x"]]
-co = container(a = 1, b = "bar")
-(co[1:2] <- 1:2)
-
-try({
-co[3] <- 3 # index out of range
-})
-(co[list(1, "b")] <- 3:4) # mixed numeric/character index
-
-co = container(a = 1, b = 2)
-co[[1]] <- 9
-co[["b"]] <- 8
-co[["x"]] <- 7
-co$z <- 99
-print(co)
-
-# Replace 8 by 0
-co[[{8}]] <- 0
-print(co)
-
-
-co = container(a = 1, b = "bar")
-co$f <- 3
-co$b <- 2
-co
-
-
-co = container(1)
-add(co, 1, b = 2, c = container(1:3))
-
-
-co = container(a = 1, 2, b = 3, 4)
-at(co, 1:3)
-at(co, "a", "b", 2)
-try(at(co, "x")) # index 'x' not found
-try(at(co, 1:10)) # index 5 exceeds length of Container
-
-co = container(a = 1, 2, b = 3, 4)
-at2(co, 1)
-at2(co, "a")
-at2(co, 2)
-try(at2(co, "x")) # index 'x' not found
-try(at2(co, 5)) # index 5 exceeds length of Container
-
-co = container(1, 2, mean)
-clear(co)
-print(co) # Original was not touched
-ref_clear(co) # Clears original
-print(co)
-
-co = container(1, 2, 3)
-co2 = clone(co)
-co == co2
-
-co = container("a", "b", "a", mean, mean)
-count(co, "a")
-count(co, mean)
-count(co, "c")
-
-co = container("a", 1:3, iris)
-print(co)
-delete(co, 1:3, "a")
-delete(co, iris)
-try({
-delete(co, "b") # "b" is not in Container
-})
-
-co = container(a = 1, b = 2, 3)
-delete_at(co, "a", "b") # [3]
-delete_at(co, 1:2) # [3]
-delete_at(co, "a", 3) # [b = 2]
-try({
- delete_at(co, 4) # index out of range
- delete_at(co, "x") # names(s) not found: 'x'
-})
-
-co = container("a", num = 1:3, data = iris)
-print(co)
-discard(co, 1:3, "a")
-discard(co, iris)
-discard(co, "b") # ignored
-
-co = container(a = 1, b = 2, 3)
-discard_at(co, "a", "b") # [3]
-discard_at(co, 1:2) # [3]
-discard_at(co, "a", 3) # [b = 2]
-discard_at(co, "x") # ignored
-
-co = container(1, 2, mean)
-has(co, 1) # TRUE
-has(co, mean) # TRUE
-has(co, 1:2) # FALSE
-
-co = container(a = 1, 2, f = mean)
-has_name(co, "a") # TRUE
-has_name(co, "f") # TRUE
-has_name(co, "2") # FALSE
-
-co = container(1, 2)
-is_empty(co)
-is_empty(clear(co))
-
-co = container(a = 1, 2, b = 3, 4)
-peek_at(co, 1)
-peek_at(co, "a")
-peek_at(co, "x")
-peek_at(co, "x", .default = 0)
-peek_at(co, "a", "x", 2, 9, .default = -1)
-
-co = container(a = 1, 2, b = 3, 4)
-peek_at2(co, 1)
-peek_at2(co, "a")
-peek_at2(co, "x")
-peek_at2(co, "x", default = 0)
-
-co = container(a = 1, b = 1:3, d = "foo")
-ref_pop(co, "b")
-ref_pop(co, 1)
-
-try({
-ref_pop(co, "x") # index 'x' not found
-})
-co = container(a = 1, b = 2, 3)
-rename(co, c("a", "b"), c("a1", "y"))
-print(co)
-ref_rename(co, c("a", "b"), c("a1", "y"))
-print(co)
-
-co = container("x", 9)
-replace(co, 9, 0)
-replace(co, "x", 0)
-try({
-replace(co, "z", 0) # old element ("z") is not in Container
-})
-replace(co, "z", 0, add = TRUE) # ok, adds the element
-
-co = container(a = 0, b = "z")
-replace_at(co, a = 1, b = 2)
-replace_at(co, 1:2, 1:2) # same
-replace_at(co, c("a", "b"), list(1, 2)) # same
-
-try({
-replace_at(co, x = 1) # names(s) not found: 'x'
-})
-replace_at(co, x = 1, .add = TRUE) # ok (adds x = 1)
-}
-\seealso{
-For the class documentation see \link{Container}.
-Objects of the derived classes can be created by \link{deque}, \link{setnew}, and
-\link{dict}.
-}
diff --git a/DESCRIPTION b/DESCRIPTION
index 10c60187..1d09f606 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
Package: container
Type: Package
Title: Extending Base 'R' Lists
-Version: 1.0.3
-Date: 2022-11-14
+Version: 1.0.4
+Date: 2022-12-11
Authors@R:
person("Roman", "Pahl",
email = "roman.pahl@gmail.com", role = c("aut", "cre"))
diff --git a/Deque.Rd b/Deque.Rd
deleted file mode 100644
index 3cab66cf..00000000
--- a/Deque.Rd
+++ /dev/null
@@ -1,209 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-DequeR6.R
-\name{Deque}
-\alias{Deque}
-\title{Deque Class}
-\description{
-Deques are a generalization of stacks and queues typically
-with methods to add, delete and access elements at both sides of the
-underlying data sequence. As such, the \link{Deque} can also be used to mimic
-both stacks and queues. For the standard S3 interface, see \code{\link[=deque]{deque()}}.
-}
-\details{
-This class inherits from class \code{\link[=Container]{Container()}} and extends it by
-\code{popleft} and \code{peek} methods, and reverse and rotate functionality.
-}
-\examples{
-d = Deque$new(1, 2, s = "a", v = 1:3)
-d$addleft(0)
-d$peekleft()
-d$peek()
-
-d$popleft()
-d$rev()
-
-d$rotate()
-d$rotate(2)
-d$rotate(-3)
-}
-\seealso{
-\code{\link[=Container]{Container()}}, \code{\link[=deque]{deque()}}
-}
-\section{Super classes}{
-\code{\link[container:Iterable]{container::Iterable}} -> \code{\link[container:Container]{container::Container}} -> \code{Deque}
-}
-\section{Methods}{
-\subsection{Public methods}{
-\itemize{
-\item \href{#method-Deque-addleft}{\code{Deque$addleft()}}
-\item \href{#method-Deque-peek}{\code{Deque$peek()}}
-\item \href{#method-Deque-peekleft}{\code{Deque$peekleft()}}
-\item \href{#method-Deque-popleft}{\code{Deque$popleft()}}
-\item \href{#method-Deque-rev}{\code{Deque$rev()}}
-\item \href{#method-Deque-rotate}{\code{Deque$rotate()}}
-\item \href{#method-Deque-clone}{\code{Deque$clone()}}
-}
-}
-\if{html}{\out{
-Inherited methods
-
-
-}}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-addleft}{}}}
-\subsection{Method \code{addleft()}}{
-Add element to left side of the \code{Deque}.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Deque$addleft(value, name = NULL)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{value}}{value of \code{ANY} type to be added to the \code{Deque}.}
-
-\item{\code{name}}{\code{character} optional name attribute of the value.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Deque} object.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-peek}{}}}
-\subsection{Method \code{peek()}}{
-Peek at last element of the \code{Deque}.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{default}}{returned default value if \code{Deque} is empty.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-element 'peeked' on the right
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-peekleft}{}}}
-\subsection{Method \code{peekleft()}}{
-Peek at first element of the \code{Deque}.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{default}}{returned default value if \code{Deque} is empty.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-element 'peeked' on the left
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-popleft}{}}}
-\subsection{Method \code{popleft()}}{
-Delete and return element from the left side of the \code{\link[=Deque]{Deque()}}.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Deque$popleft()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-element 'popped' from the left side of the \code{\link[=Deque]{Deque()}}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-rev}{}}}
-\subsection{Method \code{rev()}}{
-Reverse all elements of the \code{\link[=Deque]{Deque()}} in-place.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Deque$rev()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-the \code{Deque()} object.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-rotate}{}}}
-\subsection{Method \code{rotate()}}{
-Rotate all elements \code{n} steps to the right. If n is
-negative, rotate to the left.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{n}}{\code{integer} number of steps to rotate}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-returns the \code{Deque()} object.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Deque-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{deep}}{Whether to make a deep clone.}
-}
-\if{html}{\out{
}}
-}
-}
-}
diff --git a/DequeS3.Rd b/DequeS3.Rd
deleted file mode 100644
index 1ef3a575..00000000
--- a/DequeS3.Rd
+++ /dev/null
@@ -1,159 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-DequeS3.R, R/GroupGenericMath.R,
-% R/GroupGenericSummary.R, R/Ops-arithmetic.R, R/addleft.R, R/peek.R, R/pop.R,
-% R/rev.R, R/rotate.R
-\name{DequeS3}
-\alias{DequeS3}
-\alias{deque}
-\alias{as.deque}
-\alias{is.deque}
-\title{Deque - Double-Ended Queue}
-\usage{
-deque(...)
-
-as.deque(x)
-
-is.deque(x)
-}
-\arguments{
-\item{...}{initial elements put into the \code{Deque}.}
-
-\item{x}{\code{R} object of \code{ANY} type for \code{\link[=as.deque]{as.deque()}} and \code{\link[=is.deque]{is.deque()}}
-or of class \code{Deque} for the \code{S3} methods.}
-}
-\description{
-Deques are a generalization of stacks and queues typically
-with methods to add, remove and access elements at both sides of the
-underlying data sequence. As such, the \link{deque} can also be used to mimic
-both stacks and queues.
-}
-\details{
-Methods that alter \link{Deque} objects usually come in two versions
-providing either copy or reference semantics where the latter start with
-\code{'ref_'} to note the reference semantic, for example, \code{add()} and \code{ref_add()}.
-
-\itemize{
-\item \code{deque(...)} initializes and returns an object of class \code{Deque}
-}
-
-\itemize{
-\item \code{as.deque(x)} coerces \code{x} to a deque.
-}
-
-\itemize{
-\item \code{is.deque(x)} returns \code{TRUE} if \code{x} is of class \code{Deque}
-and \code{FALSE} otherwise.
-}
-
-\itemize{
-\item \code{x + y} combines \code{x} and \code{y} into a new deque by appending \code{y}
-to \code{x}.
-}
-
-\itemize{
-\item \code{x - y} element-wise removes all items of \code{y} from \code{x}, given
-the element was contained in \code{x}.
-}
-
-\itemize{
-\item \code{addleft(.x, ...)} adds (possibly named) elements to left side of \code{.x}.
-\item \code{ref_addleft(.x, ...)} same as \code{addleft(.x, ...)} but adds by reference.
-}
-
-\itemize{
-\item \code{peek(x, default = NULL)} peek at last element. If \code{x} is empty, return
-\code{default}.
-\item \code{peekleft(x, default = NULL)} peek at first element. If \code{x} is empty,
-return \code{default}.
-}
-
-\itemize{
-\item \code{ref_pop(.x)} pop last element. If \code{.x} is empty, an error is given.
-\item \code{ref_popleft(.x)} pop first element. If \code{.x} is empty, an error is given.
-}
-
-\itemize{
-\item \code{rev(x)} and \code{ref_rev(x)} reverses all elements being done on a copy or in
-place, respectively.
-}
-
-\itemize{
-\item \code{rotate(x, n)} rotate all elements \code{n} steps to the right, If \code{n} is
-negative, rotate to the left.
-}
-}
-\examples{
-d = deque(1, 2, s = "a", v = 1:3)
-is.deque(d)
-print(d)
-length(d)
-names(d)
-as.list(d)
-rev(d)
-
-l = list(0, 1)
-d2 = as.deque(l)
-d + d2
-c(d, d2) # same as d + d2
-d2 + d
-d - d2
-c(d2, d) # same as d2 + d
-d2 - d
-# Math
-d = deque(1, 2, -(3:5))
-d
-abs(d)
-cumsum(d)
-round(d)
-exp(d)
-
-# Summary
-range(d)
-min(d)
-max(d)
-
-d1 = deque(1, 1:2)
-d2 = deque(2, 1:2)
-d1 + d2 # same as c(d1, d2)
-d2 + d1 # same as c(d2, d1)
-
-d1 - d2
-d2 - d1
-d1 - d1
-
-
-d = deque(0)
-add(d, a = 1, b = 2) # |0, a = 1, b = 2|
-addleft(d, a = 1, b = 2) # |b = 2, a = 1, 0|
-
-d = deque(1, 2, 3)
-peek(d)
-peekleft(d)
-peek(deque())
-peek(deque(), default = 0)
-peekleft(deque(), default = 0)
-d = deque(1, 2, 3)
-ref_pop(d)
-print(d)
-ref_popleft(d)
-print(d)
-
-try({
-ref_pop(deque()) # pop at empty Deque
-})
-
-d = deque(a = 1, b = 2, 3)
-rev(d)
-print(d)
-ref_rev(d)
-print(d)
-
-d = deque(1, 2, 3, 4)
-rotate(d)
-rotate(d, n = 2)
-
-}
-\seealso{
-See \code{\link[=container]{container()}} for all inherited methods. For the full class
-documentation see \code{\link[=Deque]{Deque()}} and it's superclass \link[=container]{Container()}.
-}
diff --git a/Dict.Rd b/Dict.Rd
deleted file mode 100644
index e936f06a..00000000
--- a/Dict.Rd
+++ /dev/null
@@ -1,319 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-DictR6.R
-\name{Dict}
-\alias{Dict}
-\title{Dict Class}
-\description{
-The \code{\link[=Dict]{Dict()}} resembles Python's dict type, and is implemented
-as a specialized associative \code{\link[=Container]{Container()}}.
-For the standard S3 interface, see \link[=Dict]{dict()}.
-}
-\details{
-This class inherits from class \code{\link[=Container]{Container()}} and overwrides some
-methods to account for the associative key-value pair semantic.
-Internally, all key-value pairs are stored in a hash-table and the
-elements are always sorted lexicographically by their keys.
-}
-\examples{
-d = Dict$new(o = "one", na = NA, a = 1)
-d
-d$keys()
-
-d$add("li", list(1, 2))
-d$discard_at("na")
-d$replace(1, 9)
-
-d2 = Dict$new(a = 0, b = 1)
-d$update(d2)
-}
-\seealso{
-\code{\link[=Container]{Container()}}, \code{\link[=dict]{dict()}}
-}
-\section{Super classes}{
-\code{\link[container:Iterable]{container::Iterable}} -> \code{\link[container:Container]{container::Container}} -> \code{Dict}
-}
-\section{Methods}{
-\subsection{Public methods}{
-\itemize{
-\item \href{#method-Dict-new}{\code{Dict$new()}}
-\item \href{#method-Dict-add}{\code{Dict$add()}}
-\item \href{#method-Dict-discard_at}{\code{Dict$discard_at()}}
-\item \href{#method-Dict-get}{\code{Dict$get()}}
-\item \href{#method-Dict-keys}{\code{Dict$keys()}}
-\item \href{#method-Dict-remove}{\code{Dict$remove()}}
-\item \href{#method-Dict-replace}{\code{Dict$replace()}}
-\item \href{#method-Dict-set}{\code{Dict$set()}}
-\item \href{#method-Dict-sort}{\code{Dict$sort()}}
-\item \href{#method-Dict-update}{\code{Dict$update()}}
-\item \href{#method-Dict-values}{\code{Dict$values()}}
-\item \href{#method-Dict-clone}{\code{Dict$clone()}}
-}
-}
-\if{html}{\out{
-Inherited methods
-
}}
-\describe{
-\item{\code{...}}{initial elements put into the \code{Dict}}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-returns the \code{Dict}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-add}{}}}
-\subsection{Method \code{add()}}{
-If \code{name} not yet in \code{Dict}, insert \code{value} at \code{name},
-otherwise signal an error.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{name}}{\code{character} variable name under which to store \code{value}.}
-
-\item{\code{value}}{the value to be added to the \code{Dict}.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Dict} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-discard_at}{}}}
-\subsection{Method \code{discard_at()}}{
-Discard value at given index. If index is not found,
-the operation is ignored.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{index}}{\code{character} or \code{numeric} index}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Dict} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-get}{}}}
-\subsection{Method \code{get()}}{
-This function is deprecated. Use \code{\link[=at2]{at2()}} instead.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Dict$get(key)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{key}}{\code{character} name of key.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-If \code{key} in \code{Dict}, return value at \code{key}, else throw error.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-keys}{}}}
-\subsection{Method \code{keys()}}{
-Get all keys.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Dict$keys()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-\code{character} vector of all keys.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-remove}{}}}
-\subsection{Method \code{remove()}}{
-This function is deprecated. Use \code{\link[=delete]{delete()}} instead.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Dict$remove(key)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{key}}{\code{character} name of key.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-If \code{key} in \code{Dict}, remove it, otherwise raise an error.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-replace}{}}}
-\subsection{Method \code{replace()}}{
-Replace one element by another element.
-Search for occurence of \code{old} and, if found, replace it by \code{new}.
-If \code{old} does not exist, an error is signaled.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{key}}{\code{character} name of key.}
-
-\item{\code{value}}{the value to be set}
-
-\item{\code{add}}{\code{logical} if \code{TRUE} the value is set regardless whether
-\code{key} already exists in \code{Dict}.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-returns the \code{Dict}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-sort}{}}}
-\subsection{Method \code{sort()}}{
-Sort elements according to their keys. This function
-is deprecated as keys are now always sorted.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{decr}}{\code{logical} if \code{TRUE} sort in decreasing order.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-returns the \code{Dict}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-update}{}}}
-\subsection{Method \code{update()}}{
-Add elements of \code{other} to this if the name is
-not in the \code{Dict} and update elements with existing names.
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-a copy of all elements in a list
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Dict-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{deep}}{Whether to make a deep clone.}
-}
-\if{html}{\out{
}}
-}
-}
-}
diff --git a/DictS3.Rd b/DictS3.Rd
deleted file mode 100644
index bc3d47b0..00000000
--- a/DictS3.Rd
+++ /dev/null
@@ -1,151 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-DictS3.R, R/GroupGenericMath.R,
-% R/GroupGenericSummary.R, R/Ops-arithmetic.R, R/Ops-logic.R, R/add.R,
-% R/replace.R, R/update.R
-\name{DictS3}
-\alias{DictS3}
-\alias{dict}
-\alias{as.dict}
-\alias{is.dict}
-\title{A Dictionary}
-\usage{
-dict(...)
-
-as.dict(x)
-
-is.dict(x)
-}
-\arguments{
-\item{...}{elements put into the \code{Dict}.}
-
-\item{x}{\code{R} object of \code{ANY} type for \code{\link[=as.dict]{as.dict()}} and \code{\link[=is.dict]{is.dict()}}
-or of class \code{Dict} for the \code{S3} methods.}
-}
-\description{
-The \link{Dict} initially was developed to resemble Python's
-dict type, but by now offers both more features and flexibility, for
-example, by providing both associative key-value pair as well as
-positional array semantics.
-It is implemented as a specialized associative \link{Container} thus sharing
-all \link{Container} methods with some of them being adapted to account for
-the key-value pair semantic. All elements must be named.
-}
-\details{
-Internally, all key-value pairs are stored in a hash-table and the
-elements are sorted lexicographically by their keys.
-Methods that alter \code{Dict} objects usually come in two versions
-providing either copy or reference semantics where the latter start with
-\code{'ref_'} to note the reference semantic, for example, \code{add()} and \code{ref_add()}.
-
-\itemize{
-\item \code{dict(...)} initializes and returns an object of class \code{Dict}
-}
-
-\itemize{
-\item \code{as.dict(x)} coerces \code{x} to a dictionary
-}
-
-\itemize{
-\item \code{is.dict(x)} returns \code{TRUE} if \code{x} is of class \code{Dict}
-and \code{FALSE} otherwise.
-}
-
-\itemize{
-\item \code{x + y} combines \code{x} and \code{y} into a new dict by updating \code{x}
-by \code{y} (see also \verb{[update()]}).
-}
-
-\itemize{
-\item \code{x - y} removes all keys from \code{x} that appear in \code{y}.
-}
-
-\itemize{
-\item \code{x} \code{&} \code{y} returns a copy of \code{x} keeping only the keys that
-are common in both (key intersection), that is, all keys in \code{x} that do not
-exist in \code{y} are removed.
-}
-
-\itemize{
-\item \code{x} \code{|} \code{y} returns a copy of \code{x} extended by all elements of
-\code{y} that are stored at keys (or names) that do not exist in \code{x}, thereby
-combining the keys of both objects (set union of keys).
-}
-
-\itemize{
-\item \code{add(.x, ...)} and \code{ref_add(.x, ...)} adds \code{key = value} pairs to \code{.x}.
-If any of the keys already exists, an error is given.
-}
-
-\itemize{
-\item \code{replace(.x, old, new)} and \code{ref_replace(.x, old)} try to find element \code{old}
-and replace it with element \code{new}. If \code{old} does not exist, an error is
-raised.
-}
-
-\itemize{
-\item \code{update(object, other)} and \code{ref_update(object, other)} adds elements of \code{other} dict
-for keys not yet in \code{object} and replaces the values of existing keys.
-}
-}
-\examples{
-d = dict(b = "one", a = 1, f = mean, na = NA)
-print(d)
-names(d)
-
-try(dict(a = 1, 2)) # all elements must be named
-
-# Coercion
-as.dict(list(A = 1:3, B = "b"))
-as.dict(c(x = 1, y = "x", z = 2 + 3))
-# Math
-d = dict(a = rnorm(1), b = rnorm(1))
-abs(d)
-cumsum(d)
-round(d)
-exp(d)
-
-# Summary
-range(d)
-min(d)
-max(d)
-
-d1 = dict(a = 1, b = list(1, 2))
-d2 = dict(a = 2, b = list(1, 2))
-d1 + d2 # same as update(d, d2)
-d2 + d1 # same as update(d2, d)
-try({
-c(d1, d2) # duplicated keys are not allowed for Dict
-})
-d1 - d2
-d2 - d1
-d1 - d1
-
-d1 = dict(a = 1, b = 2)
-d2 = dict(a = 10, x = 4)
-d1 & d2 # {a = 1}
-
-d1 | d2 # {a = 1, b = 2, x = 4}
-
-
-d = dict(a = 1)
-add(d, b = 2, co = container(1:3))
-
-try(add(d, a = 7:9)) # key 'a' already in Dict
-
-d = dict(a = 1, b = "z")
-replace(d, 1, 1:5)
-replace(d, "z", "a")
-
-try({
-replace(d, "a", 2) # old element ("a") is not in Dict
-})
-
-d1 = dict(a = 1, b = 2)
-d2 = dict( b = 0, c = 3)
-update(d1, d2) # {a = 1, b = 0, c = 3}
-update(d2, d1) # {a = 1, b = 2, c = 3}
-}
-\seealso{
-See \code{\link[=container]{container()}} for all inherited methods. For the full class
-documentation see \link{Dict} and it's superclass \link{Container}.
-}
diff --git a/Iterable.Rd b/Iterable.Rd
deleted file mode 100644
index c113cddf..00000000
--- a/Iterable.Rd
+++ /dev/null
@@ -1,68 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-ContainerR6.R
-\docType{class}
-\name{Iterable}
-\alias{Iterable}
-\title{Iterable abstract class interface}
-\description{
-An \link{Iterable} is an object that provides an \code{\link[=iter]{iter()}} method,
-which is expected to return an \link{Iterator} object. This class defines the
-abstract class interface such that each class inheriting this class provides
-an \code{\link[=iter]{iter()}} method and must implement a private method \code{create_iter()},
-which must return an \link{Iterator} object.
-}
-\seealso{
-\link{Iterator} and \link{Container}
-}
-\author{
-Roman Pahl
-}
-\section{Methods}{
-\subsection{Public methods}{
-\itemize{
-\item \href{#method-Iterable-new}{\code{Iterable$new()}}
-\item \href{#method-Iterable-iter}{\code{Iterable$iter()}}
-\item \href{#method-Iterable-clone}{\code{Iterable$clone()}}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterable-new}{}}}
-\subsection{Method \code{new()}}{
-\code{Iterable} is an abstract class and thus cannot be instantiated.
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-returns the \code{Iterator} object.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterable-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-invisibly returns the \code{Iterator} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterator-begin}{}}}
-\subsection{Method \code{begin()}}{
-set iterator to the first element of the underlying
-sequence unless length of sequence is zero, in which case it will
-point to nothing.
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Iterator$begin()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-invisibly returns the \code{Iterator} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterator-get_value}{}}}
-\subsection{Method \code{get_value()}}{
-get value where the iterator points to
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-returns the value the \code{Iterator} is pointing at.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterator-get_next}{}}}
-\subsection{Method \code{get_next()}}{
-get next value
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-increments the iterator and returns the value the \code{Iterator}
-is pointing to.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterator-has_next}{}}}
-\subsection{Method \code{has_next()}}{
-check if \code{iterator} has more elements
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-\code{TRUE} if \code{iterator} has next element else \code{FALSE}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterator-has_value}{}}}
-\subsection{Method \code{has_value()}}{
-check if \code{iterator} points at value
-\subsection{Usage}{
-\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-invisibly returns the \code{Iterator} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Iterator-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{deep}}{Whether to make a deep clone.}
-}
-\if{html}{\out{
}}
-}
-}
-}
diff --git a/NEWS.md b/NEWS.md
index e755eadd..5443d57e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,8 @@
+# container 1.0.4
+
+* fix "don't run" examples
+* fix Rd files regarding tidy HTML
+
# container 1.0.1
* prevent duplicated column names when renaming dict.tables
diff --git a/OpsArithmetic.Rd b/OpsArithmetic.Rd
deleted file mode 100644
index 60ebdd21..00000000
--- a/OpsArithmetic.Rd
+++ /dev/null
@@ -1,103 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Ops-arithmetic.R
-\name{OpsArithmetic}
-\alias{OpsArithmetic}
-\alias{+.Container}
-\alias{-.Container}
-\alias{+.Deque}
-\alias{-.Deque}
-\alias{+.Dict}
-\alias{-.Dict}
-\alias{+.Set}
-\alias{-.Set}
-\title{Arithmetic Operators}
-\usage{
-\method{+}{Container}(x, y)
-
-\method{-}{Container}(x, y)
-
-\method{+}{Deque}(x, y)
-
-\method{-}{Deque}(x, y)
-
-\method{+}{Dict}(x, y)
-
-\method{-}{Dict}(x, y)
-
-\method{+}{Set}(x, y)
-
-\method{-}{Set}(x, y)
-}
-\arguments{
-\item{x, y}{Depending on the operator at least one must be of class
-\code{\link[=Container]{Container()}} or the respective derived class and the other at least be
-coercible to the respective class.}
-}
-\value{
-For \code{Container}, \code{x + y} combines \code{x} and \code{y} into a new container
-by appending \code{y} to \code{x}.
-
-For Container, \code{x - y} element-wise discards all items of \code{y}
-from \code{x}, given the element was contained in \code{x}. The result is always a
-container.
-
-For \verb{Deque,} \code{x + y} combines \code{x} and \code{y} into a new deque by
-appending \code{y} to \code{x}.
-
-For Deque, \code{x - y} element-wise removes all items of \code{y} from \code{x},
-given the element was contained in \code{x}.
-
-For \code{Dict}, \code{x + y} combines \code{x} and \code{y} into a new dict by
-updating \code{x} by \code{y} (see also \verb{[update()]}).
-
-For \code{Dict}, \code{x - y} removes all keys from \code{x} that appear in \code{y}.
-
-For \code{Set}, \code{x + y} performs the set union.
-
-For \code{Set}, \code{x - y} performs the set difference.
-}
-\description{
-Binary arithmetic operators for \code{\link[=Container]{Container()}} objects and
-derived classes.
-}
-\examples{
-c1 = container(1, 1:2)
-c2 = container(2, 1:2)
-c1 + c2 # same as c(c1, c2)
-c2 + c1 # same as c(c2, c1)
-
-c1 - c2
-c2 - c1
-c1 - c1
-# Arithmetic
-d1 = deque(1, 1:2)
-d2 = deque(2, 1:2)
-d1 + d2 # same as c(d1, d2)
-d2 + d1 # same as c(d2, d1)
-
-d1 - d2
-d2 - d1
-d1 - d1
-
-# Arithmetic
-d1 = dict(a = 1, b = list(1, 2))
-d2 = dict(a = 2, b = list(1, 2))
-d1 + d2 # same as update(d, d2)
-d2 + d1 # same as update(d2, d)
-try({
-c(d1, d2) # duplicated keys are not allowed for Dict
-})
-d1 - d2
-d2 - d1
-d1 - d1
-
-# Arithmetic
-s1 = setnew(1, 1:2)
-s2 = setnew(2, 1:2)
-s1 + s2 # same as s1 | s2 or c(c1, s2)
-s2 + s1 # same
-
-s1 - s2
-s2 - s1
-
-}
diff --git a/OpsCompare.Rd b/OpsCompare.Rd
deleted file mode 100644
index 2400d7a6..00000000
--- a/OpsCompare.Rd
+++ /dev/null
@@ -1,54 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Ops-compare.R
-\name{OpsCompare}
-\alias{OpsCompare}
-\alias{==.Container}
-\alias{!=.Container}
-\alias{<.Container}
-\alias{>.Container}
-\alias{<=.Container}
-\alias{>=.Container}
-\title{Comparison Operators}
-\usage{
-\method{==}{Container}(x, y)
-
-\method{!=}{Container}(x, y)
-
-\method{<}{Container}(x, y)
-
-\method{>}{Container}(x, y)
-
-\method{<=}{Container}(x, y)
-
-\method{>=}{Container}(x, y)
-}
-\arguments{
-\item{x, y}{at least one must be a \code{\link[=Container]{Container()}} object (or an object of
-one of the derived classes) while the other must be at least iterable.}
-}
-\description{
-Binary comparison operators for \code{\link[=Container]{Container()}} objects and
-derived classes.
-}
-\details{
-\itemize{
-\item \code{x == y} is \code{TRUE} if the contents of \code{x} and \code{y} are lexicographically \emph{equal}.
-\item \code{x != y} is \code{TRUE} if the contents of \code{x} and \code{y} are \emph{not equal}.
-\item \code{x < y} is \code{TRUE} if the contents of x are lexicographically \emph{less} than the
-contents of y.
-\item \code{x <= y} is \code{TRUE} if the contents of x are lexicographically \emph{less} than
-or \emph{equal} to the contents of y.
-}
-}
-\examples{
-c1 = container(1, 2, 3)
-c2 = container(1, 3, 2)
-c1 == c1 # TRUE
-c1 != c2 # TRUE
-c1 <= c1 # TRUE
-c1 == c2 # FALSE
-c1 < c2 # TRUE
-c1 < container(2) # TRUE
-c1 < container() # FALSE
-
-}
diff --git a/OpsExtract.Rd b/OpsExtract.Rd
deleted file mode 100644
index d6c249b2..00000000
--- a/OpsExtract.Rd
+++ /dev/null
@@ -1,43 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Ops-extract.R
-\name{OpsExtract}
-\alias{OpsExtract}
-\alias{[.Container}
-\alias{[[.Container}
-\title{Extract Parts of a Container Object}
-\usage{
-\method{[}{Container}(x, ...)
-
-\method{[[}{Container}(x, i)
-}
-\arguments{
-\item{x}{\code{Container} object from which to extract elements.}
-
-\item{i, ...}{indices specifying elements to extract. Indices
-are \code{numeric} or \code{character} vectors or a \code{list} containing both.}
-}
-\description{
-Extract parts of a \code{Container} object similar
-to R's base extract operators on lists.
-}
-\details{
-\code{[} selects multiple values. The indices can be \code{numeric} or
-\code{character} or both. They can be passed as a \code{vector} or \code{list} or,
-for convenience, just as a comma-separated sequence (see Examples).
-Non-existing indices are ignored.
-
-\code{[[} selects a single value using a \code{numeric} or \code{character} index.
-}
-\examples{
-co = container(a = 1, b = 2, c = 3, d = 4)
-co[1:2]
-co[1, 4]
-co["d", 2]
-co[list("d", 2)]
-co[0:10]
-
-co = container(a = 1, b = 2)
-co[[1]]
-co[["a"]]
-co[["x"]]
-}
diff --git a/OpsLogic.Rd b/OpsLogic.Rd
deleted file mode 100644
index 55184c04..00000000
--- a/OpsLogic.Rd
+++ /dev/null
@@ -1,33 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Ops-logic.R
-\name{OpsLogic}
-\alias{OpsLogic}
-\alias{&.Dict}
-\alias{|.Dict}
-\alias{&.Set}
-\alias{|.Set}
-\title{Logic Operators}
-\usage{
-\method{&}{Dict}(x, y)
-
-\method{|}{Dict}(x, y)
-
-\method{&}{Set}(x, y)
-
-\method{|}{Set}(x, y)
-}
-\arguments{
-\item{x, y}{Depending on the operator at least one must be of class
-\code{\link[=Container]{Container()}} or the respective derived class and the other at least be
-coercible to the respective class.}
-}
-\description{
-Binary logic operators for \code{\link[=Container]{Container()}} objects and
-derived classes.
-}
-\examples{
-d1 = dict(a = 1, b = 2)
-d2 = dict(a = 10, x = 4)
-d1 & d2 # {a = 1}
-
-}
diff --git a/OpsReplace.Rd b/OpsReplace.Rd
deleted file mode 100644
index 2b4376bb..00000000
--- a/OpsReplace.Rd
+++ /dev/null
@@ -1,69 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Ops-replace.R
-\name{OpsReplace}
-\alias{OpsReplace}
-\alias{[<-.Container}
-\alias{[[<-.Container}
-\alias{$<-.Container}
-\title{Replace Parts of a Container}
-\usage{
-\method{[}{Container}(x, i) <- value
-
-\method{[[}{Container}(x, i) <- value
-
-\method{$}{Container}(x, name) <- value
-}
-\arguments{
-\item{x}{\code{Container} object in which to replace elements.}
-
-\item{i}{indices specifying elements to replace. Indices
-are \code{numeric} or \code{character} vectors or a \code{list} containing both.}
-
-\item{value}{the replacing value of \code{ANY} type}
-
-\item{name}{\code{character} string (possibly backtick quoted)}
-}
-\description{
-Replace parts of a \code{Container} object similar
-to R's base replace operators on lists.
-}
-\details{
-\verb{[<-} replaces multiple values. The indices can be \code{numeric} or
-\code{character} or both. They can be passed as a \code{vector} or \code{list}. Values can
-be added by 'replacing' at new indices, which only works for \code{character}
-indices.
-
-\verb{[[<-} replaces a single value at a given \code{numeric} or \code{character} index.
-Instead of an index, it is also possible to replace certain elements by
-passing the element in curly braces (see Examples), that is, the object is
-searched for the element and then the element is replaced by the value.
-
-\verb{$<-} replaces a single element at a given name.
-}
-\examples{
-co = container(a = 1, b = "bar")
-(co[1:2] <- 1:2)
-
-try({
-co[3] <- 3 # index out of range
-})
-(co[list(1, "b")] <- 3:4) # mixed numeric/character index
-
-co = container(a = 1, b = 2)
-co[[1]] <- 9
-co[["b"]] <- 8
-co[["x"]] <- 7
-co$z <- 99
-print(co)
-
-# Replace 8 by 0
-co[[{8}]] <- 0
-print(co)
-
-
-co = container(a = 1, b = "bar")
-co$f <- 3
-co$b <- 2
-co
-
-}
diff --git a/OrderedSet.Rd b/OrderedSet.Rd
deleted file mode 100644
index fedafd28..00000000
--- a/OrderedSet.Rd
+++ /dev/null
@@ -1,138 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-SetR6.R
-\name{OrderedSet}
-\alias{OrderedSet}
-\title{OrderedSet Class}
-\description{
-The \link{OrderedSet} is a \link{Set} where all elements are always
-ordered.
-}
-\details{
-The order of elements is determined sequentially as follows:
-\itemize{
-\item element's length
-\item whether it is an atomic element
-\item the element's class(es)
-\item by numeric value (if applicable)
-\item it's representation when printed
-\item the name of the element in the \link{Set}
-}
-}
-\examples{
-s1 = OrderedSet$new(2, 1)
-s1
-}
-\seealso{
-\link{Container}, \link{Set}
-}
-\section{Super classes}{
-\code{\link[container:Iterable]{container::Iterable}} -> \code{\link[container:Container]{container::Container}} -> \code{\link[container:Set]{container::Set}} -> \code{OrderedSet}
-}
-\section{Methods}{
-\subsection{Public methods}{
-\itemize{
-\item \href{#method-OrderedSet-new}{\code{OrderedSet$new()}}
-\item \href{#method-OrderedSet-add}{\code{OrderedSet$add()}}
-\item \href{#method-OrderedSet-clone}{\code{OrderedSet$clone()}}
-}
-}
-\if{html}{\out{
-Inherited methods
-
}}
-\describe{
-\item{\code{...}}{initial elements put into the \code{OrderedSet}}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-returns the \code{OrderedSet} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-OrderedSet-add}{}}}
-\subsection{Method \code{add()}}{
-Add element
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{OrderedSet$add(value, name = NULL)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{value}}{value of \code{ANY} type to be added to the \code{OrderedSet}.}
-
-\item{\code{name}}{\code{character} optional name attribute of the value.}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{OrderedSet} object.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-OrderedSet-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{...}}{initial elements put into the \code{Set}}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-returns the \code{Set} object
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-add}{}}}
-\subsection{Method \code{add()}}{
-Add element
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Set$add(value, name = NULL)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{value}}{value of \code{ANY} type to be added to the \code{Set}.}
-
-\item{\code{name}}{\code{character} optional name attribute of the value.}
-}
-\if{html}{\out{
}}
-\describe{
-\item{\code{s}}{\code{Set} object to 'subtract'}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Set} object updated as a result of the set difference
-between this and s.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-intersect}{}}}
-\subsection{Method \code{intersect()}}{
-\code{Set} intersection
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Set$intersect(s)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{s}}{\code{Set} object to 'intersect'}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Set} object as a result of the intersection of this and s.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-union}{}}}
-\subsection{Method \code{union()}}{
-\code{Set} union
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Set$union(s)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{s}}{\code{Set} object to be 'unified'}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-the \code{Set} object as a result of the union of this and s.
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-is_equal}{}}}
-\subsection{Method \code{is_equal()}}{
-\code{Set} equality
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Set$is_equal(s)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{s}}{\code{Set} object to compare against}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{TRUE} if this is equal to \code{s}, otherwise \code{FALSE}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-is_subset}{}}}
-\subsection{Method \code{is_subset()}}{
-\code{Set} proper subset
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Set$is_subset(s)}\if{html}{\out{
}}
-}
-
-\subsection{Arguments}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{s}}{\code{Set} object to compare against}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{TRUE} if this is subset of \code{s}, otherwise \code{FALSE}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-is_proper_subset}{}}}
-\subsection{Method \code{is_proper_subset()}}{
-\code{Set} subset
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{s}}{\code{Set} object to compare against}
-}
-\if{html}{\out{
}}
-}
-\subsection{Returns}{
-\code{TRUE} if this is proper subset of \code{s}, otherwise \code{FALSE}
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-values}{}}}
-\subsection{Method \code{values()}}{
-Get \code{Set} values
-\subsection{Usage}{
-\if{html}{\out{
}}\preformatted{Set$values()}\if{html}{\out{
}}
-}
-
-\subsection{Returns}{
-elements of the set as a base list
-}
-}
-\if{html}{\out{}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-Set-clone}{}}}
-\subsection{Method \code{clone()}}{
-The objects of this class are cloneable with this method.
-\subsection{Usage}{
-\if{html}{\out{
}}
-\describe{
-\item{\code{deep}}{Whether to make a deep clone.}
-}
-\if{html}{\out{
}}
-}
-}
-}
diff --git a/SetS3.Rd b/SetS3.Rd
deleted file mode 100644
index 4668b2e2..00000000
--- a/SetS3.Rd
+++ /dev/null
@@ -1,115 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-SetS3.R, R/GroupGenericMath.R,
-% R/GroupGenericSummary.R, R/Ops-arithmetic.R, R/Ops-logic.R
-\name{SetS3}
-\alias{SetS3}
-\alias{setnew}
-\alias{as.set}
-\alias{as.orderedset}
-\alias{is.set}
-\alias{is.orderedset}
-\title{Set and ordered Set}
-\usage{
-setnew(..., .ordered = FALSE)
-
-as.set(x)
-
-as.orderedset(x)
-
-is.set(x)
-
-is.orderedset(x)
-}
-\arguments{
-\item{...}{initial elements put into the \code{Set}.}
-
-\item{.ordered}{\code{logical} if \code{TRUE} all elements in the \link{Set} will be
-ordered.}
-
-\item{x}{\code{R} object of \code{ANY} type for \code{\link[=as.set]{as.set()}} and \code{\link[=is.set]{is.set()}}
-or of class \code{Set} for the \code{S3} methods.}
-}
-\description{
-The \link{Set} is considered and implemented as a specialized
-\link{Container}, that is, \code{Set} elements are always unique. It provides
-typical set operations such as \code{union} and \code{intersect}.
-}
-\details{
-Methods that alter \link{Set} objects usually come in two versions
-providing either copy or reference semantics where the latter start with
-\code{'ref_'} to note the reference semantic, for example, \code{\link[=add]{add()}} and \code{\link[=ref_add]{ref_add()}}.
-
-\itemize{
-\item \code{setnew(...)} initializes and returns a \code{\link[=Set]{Set()}} object.
-}
-
-\itemize{
-\item \code{as.set(x)} coerces \code{x} to a set.
-}
-
-\itemize{
-\item \code{as.orderedset(x)} coerces \code{x} to an ordered set.
-}
-
-\itemize{
-\item \code{is.set(x)} returns \code{TRUE} if \code{x} is of class \code{Set} and \code{FALSE}
-otherwise.
-}
-
-\itemize{
-\item \code{is.orderedset(x)} returns \code{TRUE} if \code{x} is of class \code{OrderedSet}
-and \code{FALSE} otherwise.
-}
-
-\itemize{
-\item \code{x} \code{&} \code{y} performs the set intersection of x and y
-}
-
-\itemize{
-\item \code{x} \code{|} \code{y} performs the set union of x and y
-}
-}
-\examples{
-s = setnew(1, b = NA, 1:3, c = container("a", 1))
-is.set(s)
-print(s)
-length(s)
-names(s)
-as.list(s)
-unpack(s) # flatten recursively similar to unlist
-
-so = setnew(2, 1, .ordered = TRUE)
-print(so)
-add(so, 0)
-# Math
-s = setnew(5:3, 1, 2)
-s
-abs(s)
-cumsum(s)
-round(s)
-exp(s)
-
-# Summary
-range(s)
-min(s)
-max(s)
-
-s1 = setnew(1, 1:2)
-s2 = setnew(2, 1:2)
-s1 + s2 # same as s1 | s2 or c(c1, s2)
-s2 + s1 # same
-
-s1 - s2
-s2 - s1
-
-s1 = setnew(1, b = 2)
-s2 = setnew(1, b = 4)
-s1 & s2 # {1}
-
-s1 | s2 # {1, b = 2, b = 4}
-
-}
-\seealso{
-See \code{\link[=container]{container()}} for all inherited methods. For the full class
-documentation see \link{Set} and it's superclass \link{Container}.
-}
diff --git a/add.Rd b/add.Rd
deleted file mode 100644
index eee319f0..00000000
--- a/add.Rd
+++ /dev/null
@@ -1,77 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/add.R
-\name{add}
-\alias{add}
-\alias{ref_add}
-\alias{add.Container}
-\alias{ref_add.Container}
-\alias{add.Dict}
-\alias{ref_add.Dict}
-\alias{add.dict.table}
-\alias{ref_add.dict.table}
-\title{Add Elements to Containers}
-\usage{
-add(.x, ...)
-
-ref_add(.x, ...)
-
-\method{add}{Container}(.x, ...)
-
-\method{ref_add}{Container}(.x, ...)
-
-\method{add}{Dict}(.x, ...)
-
-\method{ref_add}{Dict}(.x, ...)
-
-\method{add}{dict.table}(.x, ...)
-
-\method{ref_add}{dict.table}(.x, ...)
-}
-\arguments{
-\item{.x}{an \code{R} object of the respective class.}
-
-\item{...}{elements to be added.}
-}
-\value{
-For \link{Container}, an object of class \link{Container} (or one of the
-respective derived classes).
-
-For \link{dict.table} an object of class
-\link{dict.table}.
-}
-\description{
-Add elements to container-like objects.
-}
-\note{
-While \link{add} uses copy semantics \link{ref_add} works by reference.
-
-If \code{.x} is a \link{Container}, \link{Set} or \link{Deque} object, the elements being added
-can (but must not) be named.
-
-If \code{.x} is a \link{Dict} or \link{dict.table} object,
-all elements \emph{must} be of the form \code{key = value}.
-If one of the keys already exists, an error is given.
-}
-\examples{
-
-co = container(1)
-add(co, 1, b = 2, c = container(1:3))
-
-s = setnew(1)
-add(s, 1, 1, b = 2, "1", co = container(1, 1))
-
-d = dict(a = 1)
-add(d, b = 2, co = container(1:3))
-
-try(add(d, a = 7:9)) # key 'a' already in Dict
-
-dit = dict.table(a = 1:3)
-add(dit, b = 3:1, d = 4:6)
-
-try(add(dit, a = 7:9)) # column 'a' already exists
-
-dit = dict.table(a = 1:3)
-add(dit, b = 3:1, d = 4:6)
-
-try(add(dit, a = 7:9)) # column 'a' already exists
-}
diff --git a/addleft.Rd b/addleft.Rd
deleted file mode 100644
index 8221ed32..00000000
--- a/addleft.Rd
+++ /dev/null
@@ -1,37 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/addleft.R
-\name{addleft}
-\alias{addleft}
-\alias{ref_addleft}
-\alias{addleft.Deque}
-\alias{ref_addleft.Deque}
-\title{Add Elements to the Left of Deques}
-\usage{
-addleft(.x, ...)
-
-ref_addleft(.x, ...)
-
-\method{addleft}{Deque}(.x, ...)
-
-\method{ref_addleft}{Deque}(.x, ...)
-}
-\arguments{
-\item{.x}{a \verb{[Deque]} object}
-
-\item{...}{elements to be added.}
-}
-\value{
-For \link{Deque}, an object of class \link{Deque} with the elements being
-added to the left of \code{.x}.
-}
-\description{
-Add elements to left side of \link{Deque} objects.
-}
-\note{
-While \link{addleft} uses copy semantics \link{ref_addleft} work by reference.
-}
-\examples{
-d = deque(0)
-add(d, a = 1, b = 2) # |0, a = 1, b = 2|
-addleft(d, a = 1, b = 2) # |b = 2, a = 1, 0|
-}
diff --git a/at.Rd b/at.Rd
deleted file mode 100644
index 82fc3783..00000000
--- a/at.Rd
+++ /dev/null
@@ -1,57 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/at.R
-\name{at}
-\alias{at}
-\alias{at.Container}
-\alias{at.dict.table}
-\title{Extract Elements Safely}
-\usage{
-at(.x, ...)
-
-\method{at}{Container}(.x, ...)
-
-\method{at}{dict.table}(.x, ...)
-}
-\arguments{
-\item{.x}{an \code{R} object of the respective class.}
-
-\item{...}{indices of elements to be extracted}
-}
-\value{
-For \code{Container}, returns the values at the given indidces.
-
-For \code{dict.table}, returns the columns at the given indices.
-}
-\description{
-Extract parts of a Container at given indices. If an index is invalid, an
-error is signaled. If given as a string, the element matching the
-name is returned. If there are two or more identical names, the value of the
-first match (i.e. \emph{leftmost} element) is returned. Indices can be letters or
-numbers, or both at the same time.
-}
-\examples{
-
-# Container
-co = container(a = 1, 2, b = 3, 4)
-at(co, 1:3)
-at(co, "a", "b", 2)
-try(at(co, "x")) # index 'x' not found
-try(at(co, 1:10)) # index 5 exceeds length of Container
-# Dict
-d = dict(a = 1, b = 3)
-at(d, 1:2)
-at(d, "a", 2)
-try(at(d, "x")) # index 'x' not found
-try(at(d, 1:3)) # index 5 exceeds length of Dict
-
-# dict.table
-dit = dict.table(a = 1:3, b = 4:6)
-at(dit, "a")
-at(dit, 2)
-at(dit, "a", 2)
-try(at(dit, "x")) # index 'x' not found
-try(at(dit, 1:3)) # index 3 exceeds length of dict.table
-}
-\seealso{
-\code{\link[=peek_at]{peek_at()}} for less strict extraction
-}
diff --git a/at2.Rd b/at2.Rd
deleted file mode 100644
index ecc0333b..00000000
--- a/at2.Rd
+++ /dev/null
@@ -1,66 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/at2.R
-\name{at2}
-\alias{at2}
-\alias{at2.Container}
-\alias{at2.dict.table}
-\title{Extract Single Elements Safely}
-\usage{
-at2(x, ...)
-
-\method{at2}{Container}(x, index, ...)
-
-\method{at2}{dict.table}(x, index, ...)
-}
-\arguments{
-\item{x}{an \code{R} object of the respective class.}
-
-\item{...}{other arguments passed to or from methods.}
-
-\item{index}{\code{character} name or \code{numeric} position of the sought value.}
-}
-\value{
-For \code{Container}, returns the value at the given index.
-
-For \code{dict.table}, returns the column at the given \code{index} or signals
-an error if not found.
-}
-\description{
-Extracts the value of a Container at the given index. If the index is
-invalid, an error is signaled. If given as a string, the element matching the
-name is returned. If there are two or more identical names, the value of the
-first match (i.e. \emph{leftmost} element) is returned.
-Extract value at index. If index is invalid or not found, an error is
-signaled. If given as a string, the element matching the name is returned.
-If there are two or more identical names, the value of the first match (i.e.
-\emph{leftmost} element) is returned.
-}
-\examples{
-
-# Container
-co = container(a = 1, 2, b = 3, 4)
-at2(co, 1)
-at2(co, "a")
-at2(co, 2)
-try(at2(co, "x")) # index 'x' not found
-try(at2(co, 5)) # index 5 exceeds length of Container
-
-# Dict
-d = dict(a = 1, b = 3)
-at2(d, 1)
-at2(d, "a")
-at2(d, 2)
-try(at2(d, "x")) # index 'x' not found
-try(at2(d, 5)) # index 5 exceeds length of Dict
-
-# dict.table
-dit = dict.table(a = 1:3, b = 4:6)
-at2(dit, 1)
-at2(dit, "a")
-at2(dit, 2)
-try(at2(dit, "x")) # index 'x' not found
-try(at2(dit, 5)) # index 5 exceeds length of dict.table
-}
-\seealso{
-\code{\link[=peek_at2]{peek_at2()}} for less strict extraction
-}
diff --git a/clear.Rd b/clear.Rd
deleted file mode 100644
index 2696c827..00000000
--- a/clear.Rd
+++ /dev/null
@@ -1,50 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/clear.R
-\name{clear}
-\alias{clear}
-\alias{ref_clear}
-\alias{clear.Container}
-\alias{ref_clear.Container}
-\alias{clear.dict.table}
-\alias{ref_clear.dict.table}
-\title{Clear a Container}
-\usage{
-clear(x)
-
-ref_clear(x)
-
-\method{clear}{Container}(x)
-
-\method{ref_clear}{Container}(x)
-
-\method{clear}{dict.table}(x)
-
-\method{ref_clear}{dict.table}(x)
-}
-\arguments{
-\item{x}{any \code{R} object.}
-}
-\value{
-For \link{Container}, an object of class \link{Container} (or one of the
-respective derived classes).
-
-For \link{dict.table} an object of class
-\link{dict.table}.
-}
-\description{
-Removes all elements from the container object.
-}
-\examples{
-
-co = container(1, 2, mean)
-clear(co)
-co
-ref_clear(co)
-co
-
-dit = dict.table(a = 1, b = 2)
-clear(dit)
-dit # original was not touched
-ref_clear(dit)
-dit # original was cleared
-}
diff --git a/clone.Rd b/clone.Rd
deleted file mode 100644
index e8fd0b2b..00000000
--- a/clone.Rd
+++ /dev/null
@@ -1,34 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/clone.R
-\name{clone}
-\alias{clone}
-\alias{clone.Container}
-\alias{clone.dict.table}
-\title{Clone an Object}
-\usage{
-clone(x)
-
-\method{clone}{Container}(x)
-
-\method{clone}{dict.table}(x)
-}
-\arguments{
-\item{x}{any \code{R} object.}
-}
-\value{
-A copy of the object.
-}
-\description{
-Creates a copy of the object.
-}
-\examples{
-
-co = container(1, 2, 3)
-co2 = clone(co)
-co == co2
-
-d = dict.table(a = 1:2, b = 3:4)
-d2 = clone(d)
-ref_clear(d)
-print(d2)
-}
diff --git a/container_options.Rd b/container_options.Rd
deleted file mode 100644
index 8373926b..00000000
--- a/container_options.Rd
+++ /dev/null
@@ -1,69 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/options.R
-\name{container_options}
-\alias{container_options}
-\alias{getContainerOption}
-\title{Set Container Package Options}
-\usage{
-container_options(..., .reset = FALSE)
-
-getContainerOption(x, default = NULL)
-}
-\arguments{
-\item{...}{any options can be defined, using name = value.}
-
-\item{.reset}{\code{logical} if \code{TRUE}, the options are reset to their default and
-returned.}
-
-\item{x}{a character string holding an option name.}
-
-\item{default}{if the specified option is not set in the options list, this
-value is returned.}
-}
-\value{
-\itemize{
-\item \code{container_options()} returns a list of all set options sorted by name.
-\item \code{container_options(name)}, a list of length one containing the set value,
-or \code{NULL} if it is unset. Can also be multiple names (see Examples).
-\item \code{container_options(key = value)} sets the option with name \code{key} to \code{value}
-and returns the previous options invisibly.
-}
-}
-\description{
-Set Container Package Options
-}
-\section{Container Options}{
-
-\itemize{
-\item \code{compare} (default = \code{all.equal})
-\item \code{useDots} (default = \code{TRUE}) whether to abbreviate long container
-elements with \code{...} when exceeding \code{vec.len} (see below). If \code{FALSE}, they
-are abbreviated as \verb{<>}.
-\item \code{vec.len} (default = 4) the length limit at which container vectors are
-abbreviated.
-}
-}
-
-\examples{
-co = container(1L, 1:10, as.list(1:5))
-co
-
-container_options(useDots = FALSE)
-co
-
-container_options(useDots = TRUE, vec.len = 6)
-co
-
-has(co, 1.0)
-
-container_options(compare = "identical")
-
-has(co, 1.0) # still uses 'all.equal'
-
-co2 = container(1L)
-has(co2, 1.0)
-has(co2, 1L)
-
-container_options()
-container_options(.reset = TRUE)
-}
diff --git a/count.Rd b/count.Rd
deleted file mode 100644
index 3030dd7d..00000000
--- a/count.Rd
+++ /dev/null
@@ -1,32 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/count.R
-\name{count}
-\alias{count}
-\alias{count.Container}
-\alias{count.Set}
-\title{Count Elements}
-\usage{
-count(x, elem)
-
-\method{count}{Container}(x, elem)
-
-\method{count}{Set}(x, elem)
-}
-\arguments{
-\item{x}{any \code{R} object.}
-
-\item{elem}{element to counted.}
-}
-\value{
-\code{integer} number of how many times \code{elem} occurs in the object.
-}
-\description{
-Count the number of occurences of some element.
-}
-\examples{
-
-co = container("a", "b", "a", mean, mean)
-count(co, "a")
-count(co, mean)
-count(co, "c")
-}
diff --git a/delete.Rd b/delete.Rd
deleted file mode 100644
index 1d3102cd..00000000
--- a/delete.Rd
+++ /dev/null
@@ -1,40 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/delete.R
-\name{delete}
-\alias{delete}
-\alias{ref_delete}
-\alias{delete.Container}
-\alias{ref_delete.Container}
-\title{Delete Container Elements Safely}
-\usage{
-delete(.x, ...)
-
-ref_delete(.x, ...)
-
-\method{delete}{Container}(.x, ...)
-
-\method{ref_delete}{Container}(.x, ...)
-}
-\arguments{
-\item{.x}{any \code{R} object.}
-
-\item{...}{elements to be deleted.}
-}
-\value{
-For \code{Container}, an object of class \code{Container} (or one of the
-respective derived classes).
-}
-\description{
-Search and remove elements from an object. If the element is not found,
-an error is signaled.
-}
-\examples{
-
-s = setnew("a", 1:3, iris)
-print(s)
-delete(s, 1:3, "a")
-delete(s, iris)
-try({
-delete(s, "b") # "b" is not in Set
-})
-}
diff --git a/delete_at.Rd b/delete_at.Rd
deleted file mode 100644
index 2c6c932a..00000000
--- a/delete_at.Rd
+++ /dev/null
@@ -1,58 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/delete_at.R
-\name{delete_at}
-\alias{delete_at}
-\alias{ref_delete_at}
-\alias{delete_at.Container}
-\alias{ref_delete_at.Container}
-\alias{delete_at.dict.table}
-\alias{ref_delete_at.dict.table}
-\title{Delete Elements at Indices Safely}
-\usage{
-delete_at(.x, ...)
-
-ref_delete_at(.x, ...)
-
-\method{delete_at}{Container}(.x, ...)
-
-\method{ref_delete_at}{Container}(.x, ...)
-
-\method{delete_at}{dict.table}(.x, ...)
-
-\method{ref_delete_at}{dict.table}(.x, ...)
-}
-\arguments{
-\item{.x}{any \code{R} object.}
-
-\item{...}{indices at which values are to be deleted.}
-}
-\value{
-For \code{Container}, an object of class \code{Container} (or one of the
-respective derived classes).
-
-For \code{dict.table}, an object of class \code{dict.table}.
-}
-\description{
-Search and remove values at given indices, which can be numeric or character
-or both. If any given index is invalid, an error is signaled. Indices can be
-numbers or names or both.
-}
-\examples{
-
-co = container(a = 1, b = 2, 3)
-delete_at(co, "a", "b") # [3]
-delete_at(co, 1:2) # [3]
-delete_at(co, "a", 3) # [b = 2]
-try({
-delete_at(co, 4) # index out of range
-delete_at(co, "x") # names(s) not found: 'x'
-})
-
-dit = as.dict.table(head(sleep))
-dit
-delete_at(dit, "ID")
-delete_at(dit, "ID", 1)
-try({
- delete_at(dit, "foo") # Column 'foo' not in dict.table
-})
-}
diff --git a/deprecated.Rd b/deprecated.Rd
deleted file mode 100644
index 2cbab9ee..00000000
--- a/deprecated.Rd
+++ /dev/null
@@ -1,56 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/container-deprecated.R
-\name{deprecated}
-\alias{deprecated}
-\alias{empty}
-\alias{empty.Container}
-\alias{size}
-\alias{size.Container}
-\alias{sortkey}
-\alias{sortkey.Dict}
-\alias{values}
-\alias{values.Container}
-\alias{values.dict.table}
-\alias{keys}
-\title{Deprecated Functions}
-\usage{
-empty(x)
-
-\method{empty}{Container}(x)
-
-size(x)
-
-\method{size}{Container}(x)
-
-sortkey(x, decr = FALSE)
-
-\method{sortkey}{Dict}(x, decr = FALSE)
-
-values(x)
-
-\method{values}{Container}(x)
-
-\method{values}{dict.table}(x)
-
-keys(x)
-}
-\arguments{
-\item{x}{any \code{R} object.}
-
-\item{decr}{\code{logical} sort decreasingly?}
-}
-\description{
-These functions are provided for backwards-compatibility and
-may be defunct as soon as the next release.
-}
-\details{
-\itemize{
-\item \code{\link[=empty]{empty()}} \code{\link[=is_empty]{is_empty()}} instead
-\item \code{\link[=set]{set()}} \code{\link[=setnew]{setnew()}} instead
-\item \code{\link[=size]{size()}} use \code{\link[=length]{length()}} instead
-\item \code{\link[=sortkey]{sortkey()}} keys of \link{Dict} objects are now always sorted
-\item \code{\link[=remove]{remove()}} use \code{\link[=delete]{delete()}} instead
-\item \code{\link[=type]{type()}} not of use anymore
-\item \code{\link[=values]{values()}} use \code{\link[=as.list]{as.list()}} instead
-}
-}
diff --git a/dict.table.Rd b/dict.table.Rd
deleted file mode 100644
index a53e05d0..00000000
--- a/dict.table.Rd
+++ /dev/null
@@ -1,309 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/0-dict.table.R, R/add.R, R/at.R,
-% R/at2.R, R/clear.R, R/clone.R, R/delete_at.R, R/discard_at.R, R/has.R,
-% R/has_name.R, R/is_empty.R, R/peek_at.R, R/peek_at2.R, R/pop.R, R/rename.R,
-% R/replace_at.R, R/update.R
-\name{dict.table}
-\alias{dict.table}
-\alias{as.dict.table}
-\alias{as.dict.table.data.table}
-\alias{is.dict.table}
-\alias{rbind.dict.table}
-\alias{cbind.dict.table}
-\title{Combining Dict and data.table}
-\usage{
-dict.table(...)
-
-as.dict.table(x, ...)
-
-\method{as.dict.table}{data.table}(x, copy = TRUE, ...)
-
-is.dict.table(x)
-
-\method{rbind}{dict.table}(x, ...)
-
-\method{cbind}{dict.table}(x, ...)
-}
-\arguments{
-\item{...}{elements put into the \link{dict.table} and/or additional
-arguments to be passed on.}
-
-\item{x}{any \code{R} object or a \link{dict.table} object.}
-
-\item{copy}{if \code{TRUE} creates a copy of the \link{data.table} object otherwise
-works on the passed object by reference.}
-}
-\description{
-The \link{dict.table} is a combination of \link{dict} and
-\href{https://CRAN.R-project.org/package=data.table}{data.table}
-and basically can be considered a
-\href{https://CRAN.R-project.org/package=data.table}{data.table}
-with unique
-column names and an extended set of functions to add, extract and
-remove data columns with the goal to further facilitate code development
-using \href{https://CRAN.R-project.org/package=data.table}{data.table}.
-A \link{dict.table} object provides all \link{dict} and
-\href{https://CRAN.R-project.org/package=data.table}{data.table}
-functions and operators at the same time.
-}
-\details{
-Methods that alter \link{dict.table} objects usually come in two versions
-providing either copy or reference semantics where the latter start with
-\code{'ref_'} to note the reference semantic, for example, \code{\link[=add]{add()}} and \code{\link[=ref_add]{ref_add()}}.
-
-\itemize{
-\item \code{dict.table(...)} initializes and returns a \link{dict} object.
-}
-
-\itemize{
-\item \code{as.dict.table(x, ...)} coerce \code{x} to a \link{dict.table}
-}
-
-\itemize{
-\item \code{is.dict.table(x)} check if \code{x} is a \code{dict.table}
-}
-
-\itemize{
-\item \code{add(.x, ...)} and \code{ref_add(.x, ...)} add columns to \code{.x}. If the column name
-already exists, an error is given.
-}
-
-\itemize{
-\item \code{at(.x, ...)} returns the columns at the given indices. Indices
-can be letters or numbers or both. All columns must exist.
-}
-
-\itemize{
-\item \code{at2(x, index)} returns the column at the given \code{index} or signals
-an error if not found.
-}
-
-\itemize{
-\item \code{clear(x)} and \code{ref_clear(x)} remove all elements from \code{x}.
-}
-
-\itemize{
-\item \code{clone(x)} create a copy of \code{x}.
-}
-
-\itemize{
-\item \code{delete_at(.x, ...)} and \code{ref_delete_at(.x, ...)} find and remove columns either by
-name or index (or both). If one or more columns don't exist, an error is signaled.
-}
-
-\itemize{
-\item \code{discard_at(.x, ...)} and \code{ref_discard_at(.x, ...)} find and remove columns
-either by name or index (or both). Invalid column indices are ignored.
-}
-
-\itemize{
-\item \code{has(x, column)} check if some \code{column} is in dict.table object.
-}
-
-\itemize{
-\item \code{has_name(x, name)} check if \code{x} has the given column name.
-}
-
-\itemize{
-\item \code{is_empty(x)} \code{TRUE} if object is empty otherwise \code{FALSE}
-}
-
-\itemize{
-\item \code{peek_at(x, ..., .default = NULL)} returns the columns at the given
-indices or (if not found) columns with the given default value.
-}
-
-\itemize{
-\item \code{peek_at2(x, index, default = NULL)} return column named \code{index} if it exist
-otherwise the given \code{default} value. If the default length does not match
-the number of rows, it is recycled accordingly and a warning is given,
-unless the default value has a length of 1, in which case recycling is
-done silently.
-}
-
-\itemize{
-\item \code{ref_pop(.x, index)} return element at given column index and remove the
-column from the dict.table object.
-}
-
-\itemize{
-\item \code{rename(.x, old, new)} and \code{ref_rename(.x, old, new)} rename one or more
-columns from \code{old} to \code{new}, respectively, by copy and in place (i.e. by
-reference).
-}
-
-\itemize{
-\item \code{replace_at(.x, .., .add = FALSE)} and \code{ref_replace_at(.x, ..., .add = FALSE)}
-replace values at given indices. If a given index is invalid, an error is
-signaled unless \code{.add} was set to \code{TRUE}.
-}
-
-\itemize{
-\item \code{update(object, other)} and \code{ref_update(object, other)} adds columns of \code{other} dict
-that are not yet in \code{object} and replaces the values at existing columns.
-}
-}
-\examples{
-# Some basic examples using some typical data.table and dict operations.
-# The constructor can take the 'key' argument known from data.table():
-require(data.table)
-dit = dict.table(x = rep(c("b","a","c"), each = 3), y = c(1,3,6), key = "y")
-print(dit)
-setkey(dit, "x") # sort by 'x'
-print(dit)
-(add(dit, "v" = 1:9)) # add column v = 1:9
-dit[y > 5]
-(ref_discard_at(dit, "x")) # discard column 'x'
-
-try(at(dit, "x")) # index 'x' not found
-try(replace_at(dit, x = 0)) # cannot be replaced, if it does not exist
-
-dit = replace_at(dit, x = 0, .add = TRUE) # ok - re-adds column 'x' with all 0s
-peek_at(dit, "x") # glance at column 'x'
-has_name(dit, "x") # TRUE
-ref_pop(dit, "x") # get column and remove it
-has_name(dit, "x") # FALSE
-
-
-# Copy and reference semantics when coercing *from* a data.table
-dat = data.table(a = 1, b = 2)
-dit = as.dict.table(dat)
-is.dict.table(dit) # TRUE
-is.dict.table(dat) # FALSE
-ref_replace_at(dit, "a", 9)
-dit[["a"]] # 9
-dat[["a"]] # 1
-dit.dat = as.dict.table(dat, copy = FALSE) # init by reference
-ref_replace_at(dit.dat, "a", 9)
-dat[["a"]] # 9
-is.dict.table(dit.dat) # TRUE
-is.dict.table(dat) # TRUE now as well!
-
-# Coerce from dict
-d = dict(a = 1, b = 1:3)
-as.dict.table(d)
-
-dit = dict.table(a = 1:2, b = 1:2)
-rbind(dit, dit)
-
-# rbind ...
-dit = dict.table(a = 1:2, b = 1:2)
-rbind(dit, dit)
-
-# ... can be mixed with data.tables
-dat = data.table(a = 3:4, b = 3:4)
-rbind(dit, dat) # yields a dict.table
-rbind(dat, dit) # yields a data.table
-
-# cbind ...
-dit = dict.table(a = 1:2, b = 1:2)
-dit2 = dict.table(c = 3:4, d = 5:6)
-cbind(dit, dit2)
-
-# ... can be mixed with data.tables
-dat = data.table(x = 3:4, y = 3:4)
-cbind(dit, dat)
-
-dit = dict.table(a = 1:3)
-add(dit, b = 3:1, d = 4:6)
-
-try(add(dit, a = 7:9)) # column 'a' already exists
-
-dit = dict.table(a = 1:3, b = 4:6)
-at(dit, "a")
-at(dit, 2)
-at(dit, "a", 2)
-try(at(dit, "x")) # index 'x' not found
-try(at(dit, 1:3)) # index 3 exceeds length of dict.table
-
-dit = dict.table(a = 1:3, b = 4:6)
-at2(dit, 1)
-at2(dit, "a")
-at2(dit, 2)
-try(at2(dit, "x")) # index 'x' not found
-try(at2(dit, 5)) # index 5 exceeds length of dict.table
-
-dit = dict.table(a = 1, b = 2)
-clear(dit)
-dit
-ref_clear(dit)
-dit
-
-d = dict.table(a = 1:2, b = 3:4)
-d2 = clone(d)
-ref_clear(d)
-print(d2)
-
-(dit = as.dict.table(head(sleep)))
-delete_at(dit, "ID")
-delete_at(dit, "ID", 1)
-
-try({
-delete_at(dit, "foo") # Column 'foo' not in dict.table
-})
-
-dit = as.dict.table(head(sleep))
-discard_at(dit, "ID")
-discard_at(dit, "ID", 1)
-discard_at(dit, "foo") # ignored
-
-dit = dict.table(a = 1:3, b = as.list(4:6))
-has(dit, 1:3) # TRUE
-has(dit, 4:6) # FALSE
-has(dit, as.list(4:6)) # TRUE
-
-dit = dict.table(a = 1, b = 2)
-has_name(dit, "a") # TRUE
-has_name(dit, "x") # FALSE
-
-d = dict.table(a = 1:4, b = 4:1)
-is_empty(d)
-is_empty(clear(d))
-
-dit = dict.table(a = 1:3, b = 4:6)
-peek_at(dit, "a")
-peek_at(dit, 1)
-peek_at(dit, 3)
-peek_at(dit, "x")
-peek_at(dit, "x", .default = 0)
-peek_at(dit, "a", "x", .default = 0)
-
-dit = dict.table(a = 1:3, b = 4:6)
-peek_at2(dit, "a")
-peek_at2(dit, 1)
-peek_at2(dit, 3)
-peek_at2(dit, 3, default = 9)
-peek_at2(dit, "x")
-peek_at2(dit, "x", default = 0)
-
-dit = dict.table(a = 1:3, b = 4:6)
-ref_pop(dit, "a")
-ref_pop(dit, 1)
-
-try({
-ref_pop(dit, "x") # index 'x' not found
-})
-
-dit = dict.table(a = 1, b = 2, c = 3)
-rename(dit, c("a", "b"), c("a1", "y"))
-print(dit)
-ref_rename(dit, c("a", "b"), c("a1", "y"))
-print(dit)
-
-dit = dict.table(a = 1:3)
-replace_at(dit, "a", 3:1)
-
-try({
-replace_at(dit, "b", 4:6) # column 'b' not in dict.table
-})
-replace_at(dit, "b", 4:6, .add = TRUE) # ok, adds column
-
-# Update parts of tables (second overwrites columns of the first)
-dit1 = dict.table(a = 1:2, b = 3:4)
-dit2 = dict.table( b = 5:6, c = 8:9)
-update(dit1, dit2)
-update(dit2, dit1)
-}
-\seealso{
-\link{dict}, \href{https://CRAN.R-project.org/package=data.table}{data.table}
-}
diff --git a/discard.Rd b/discard.Rd
deleted file mode 100644
index 87965851..00000000
--- a/discard.Rd
+++ /dev/null
@@ -1,38 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/discard.R
-\name{discard}
-\alias{discard}
-\alias{ref_discard}
-\alias{discard.Container}
-\alias{ref_discard.Container}
-\title{Discard Container Elements}
-\usage{
-discard(.x, ...)
-
-ref_discard(.x, ...)
-
-\method{discard}{Container}(.x, ...)
-
-\method{ref_discard}{Container}(.x, ...)
-}
-\arguments{
-\item{.x}{any \code{R} object.}
-
-\item{...}{elements to be discarded.}
-}
-\value{
-For \code{Container}, an object of class \code{Container} (or one of the
-respective derived classes).
-}
-\description{
-Search and remove an element from an object. If the element is not found,
-ignore the attempt.
-}
-\examples{
-
-s = setnew("a", num = 1:3, data = iris)
-print(s)
-discard(s, 1:3, "a")
-discard(s, iris)
-discard(s, "b") # ignored
-}
diff --git a/discard_at.Rd b/discard_at.Rd
deleted file mode 100644
index 36ef3db4..00000000
--- a/discard_at.Rd
+++ /dev/null
@@ -1,51 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/discard_at.R
-\name{discard_at}
-\alias{discard_at}
-\alias{ref_discard_at}
-\alias{discard_at.Container}
-\alias{ref_discard_at.Container}
-\alias{discard_at.dict.table}
-\alias{ref_discard_at.dict.table}
-\title{Discard Elements at Indices}
-\usage{
-discard_at(.x, ...)
-
-ref_discard_at(.x, ...)
-
-\method{discard_at}{Container}(.x, ...)
-
-\method{ref_discard_at}{Container}(.x, ...)
-
-\method{discard_at}{dict.table}(.x, ...)
-
-\method{ref_discard_at}{dict.table}(.x, ...)
-}
-\arguments{
-\item{.x}{any \code{R} object.}
-
-\item{...}{indices at which values are to be discarded.}
-}
-\value{
-For \code{Container}, an object of class \code{Container} (or one of the
-respective derived classes).
-
-For \code{dict.table}, an object of class \code{dict.table}.
-}
-\description{
-Search and remove values at given indices, which can be numeric or character
-or both. Invalid indices are ignored.
-}
-\examples{
-
-co = container(a = 1, b = 2, 3)
-discard_at(co, "a", "b") # [3]
-discard_at(co, 1:2) # [3]
-discard_at(co, "a", 3) # [b = 2]
-discard_at(co, "x") # ignored
-
-dit = as.dict.table(head(sleep))
-discard_at(dit, "ID")
-discard_at(dit, "ID", 1)
-discard_at(dit, "foo") # ignored
-}
diff --git a/docs/404.html b/docs/404.html
index f1b567c2..35f5881d 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -1,74 +1,34 @@
-
-
-
-
+
+
+
+
-
Page not found (404) • container
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
Since R has always been used as an interactive tool, base R list operations are generous with respect to errors, which can lead to undetected bugs when developing code. In contrast, the container package provides additional functions for all basic operations that allow for fine control to avoid many pitfalls that can happen with lists and will usually result in more robust code.
-
-
-Add elements
+
+
Add elements
+
New elements can be added “as usual” by concatenation or name.
In contrast to base lists, the container will not allow to add elements at positions longer than the length of the object.
-co[[4]]<-4
-# Error: index out of range (length = 3): 4
+co[[4]]<-4
+# Error: index out of range (length = 3): 4
If the name does not exist, the element is appended as known from base lists.
-co[["y"]]<-4
-co
-# [x = 0, 12, x = 3, y = 4]
+co[["y"]]<-4
+co
+# [x = 0, 12, x = 3, y = 4]
If you want to make sure that something is replaced, container provides the function replace_at, which will only replace elements if at names or positions that exist. The following statements are all equal and show the different possibilities on how to use replace_at.
-replace_at(co, x =10, y =13)# name = value pairs
-# [x = 10, 12, x = 3, y = 13]
-replace_at(co, c("x", "y"), c(10, 13))# names followed by values
-# [x = 10, 12, x = 3, y = 13]
-replace_at(co, c(1, 4), c(10, 13))# positions followed by values
-# [x = 10, 12, x = 3, y = 13]
-replace_at(co, list(1, "y"), c(10, 13))# mixed names/positions followed by values
-# [x = 10, 12, x = 3, y = 13]
+replace_at(co, x =10, y =13)# name = value pairs
+# [x = 10, 12, x = 3, y = 13]
+replace_at(co, c("x", "y"), c(10, 13))# names followed by values
+# [x = 10, 12, x = 3, y = 13]
+replace_at(co, c(1, 4), c(10, 13))# positions followed by values
+# [x = 10, 12, x = 3, y = 13]
+replace_at(co, list(1, "y"), c(10, 13))# mixed names/positions followed by values
+# [x = 10, 12, x = 3, y = 13]
Now see how invalid indices are signaled.
-replace_at(co, z =10)
-# Error: names(s) not found: 'z'
-replace_at(co, "z", 10)
-# Error: names(s) not found: 'z'
-replace_at(co, 5, 10)
-# Error: index out of range (length = 4): 5
+replace_at(co, z =10)
+# Error: names(s) not found: 'z'
+replace_at(co, "z", 10)
+# Error: names(s) not found: 'z'
+replace_at(co, 5, 10)
+# Error: index out of range (length = 4): 5
If you instead want elements at new names to be added, set .add = TRUE. Invalid positional indices are still signaled.
-co=replace_at(co, z =10, .add =TRUE)
-co=replace_at(co, 7, 10, .add =TRUE)
-# Error: index out of range (length = 5): 7
-co
-# [x = 0, 12, x = 3, y = 4, z = 10]
+co=replace_at(co, z =10, .add =TRUE)
+co=replace_at(co, 7, 10, .add =TRUE)
+# Error: index out of range (length = 5): 7
+co
+# [x = 0, 12, x = 3, y = 4, z = 10]
It is also possible to replace elements by value, that is, you specify the value (not the index) that should be replaced. Let’s replace the 12 by “foo” and then 4 by 1:4.
-co=replace(co, 12, "foo")
-co
-# [x = 0, "foo", x = 3, y = 4, z = 10]
-co=replace(co, 4, 1:4)
-co
-# [x = 0, "foo", x = 3, y = (1L 2L 3L 4L), z = 10]
+co=replace(co, 12, "foo")
+co
+# [x = 0, "foo", x = 3, y = 4, z = 10]
+co=replace(co, 4, 1:4)
+co
+# [x = 0, "foo", x = 3, y = (1L 2L 3L 4L), z = 10]
In an interactive R session you may want to apply the notation using curly braces.
-co[[{1:4}]]<-1:2
-co
-# [x = 0, "foo", x = 3, y = (1L 2L), z = 10]
+co[[{1:4}]]<-1:2
+co
+# [x = 0, "foo", x = 3, y = (1L 2L), z = 10]
-
-
-Extract elements
+
+
Extract elements
+
First of all, standard extract operators apply as expected.
-co[[1]]
-# [1] 0
-co[["x"]]
-# [1] 0
-co[3:5]
-# [x = 3, y = (1L 2L), z = 10]
-co[c("x", "y", "z")]
-# [x = 0, y = (1L 2L), z = 10]
+co[[1]]
+# [1] 0
+co[["x"]]
+# [1] 0
+co[3:5]
+# [x = 3, y = (1L 2L), z = 10]
+co[c("x", "y", "z")]
+# [x = 0, y = (1L 2L), z = 10]
Programmatically, the corresponding functions to select one or multiple elements are named at2 and at.
-at2(co, 1)
-# [1] 0
-at2(co, "x")
-# [1] 0
-at(co, 3:5)
-# [x = 3, y = (1L 2L), z = 10]
-at(co, c("x", "y", "z"))
-# [x = 0, y = (1L 2L), z = 10]
+at2(co, 1)
+# [1] 0
+at2(co, "x")
+# [1] 0
+at(co, 3:5)
+# [x = 3, y = (1L 2L), z = 10]
+at(co, c("x", "y", "z"))
+# [x = 0, y = (1L 2L), z = 10]
As before you can specify mixed indices via lists.
-indices=list("x", 4, "z")
-at(co, indices)
-# [x = 0, y = (1L 2L), z = 10]
+indices=list("x", 4, "z")
+at(co, indices)
+# [x = 0, y = (1L 2L), z = 10]
Again, accessing non-existent names or positions is signaled with an error.
-at2(co, 10)
-# Error: index 10 exceeds length of Container, which is 5
-at2(co, "a")
-# Error: index 'a' not found
-at(co, 3:6)
-# Error: index 6 exceeds length of Container, which is 5
-at(co, c("x", "a"))
-# Error: index 'a' not found
+at2(co, 10)
+# Error: index 10 exceeds length of Container, which is 5
+at2(co, "a")
+# Error: index 'a' not found
+at(co, 3:6)
+# Error: index 6 exceeds length of Container, which is 5
+at(co, c("x", "a"))
+# Error: index 'a' not found
With base R lists non-existent indices usually yield NULL.
As you see, one important difference is multiple access via peek_at will not insert NULL values by default. However, both functions in fact allow to specify the default value that is returned if the index does not exist.
With the container package this is done differently, as replacing by NULL will not delete the element but literally replace it by NULL.
-co[["x"]]<-NULL
-co
-# [x = NULL, "foo", x = 3, y = (1L 2L), z = 10]
+co[["x"]]<-NULL
+co
+# [x = NULL, "foo", x = 3, y = (1L 2L), z = 10]
Instead, elements can be deleted by index (delete_at) or value (delete) as follows.
-delete_at(co, 1, "y", "z")
-# ["foo", x = 3]
-delete(co, NULL, 1:2, 10)# same but remove by value
-# ["foo", x = 3]
+delete_at(co, 1, "y", "z")
+# ["foo", x = 3]
+delete(co, NULL, 1:2, 10)# same but remove by value
+# ["foo", x = 3]
As before, invalid indices or missing values are signaled.
-delete_at(co, "a")
-# Error: names(s) not found: 'a'
-delete_at(co, 10)
-# Error: index out of range (length = 5): 10
-
-delete(co, 1:3)
-# Error: (1L 2L 3L) is not in Container
+delete_at(co, "a")
+# Error: names(s) not found: 'a'
+delete_at(co, 10)
+# Error: index out of range (length = 5): 10
+
+delete(co, 1:3)
+# Error: (1L 2L 3L) is not in Container
If you need a less strict delete operation, use the discard functions, which delete all valid indices/values and ignore the rest.
-discard_at(co, 1, "a")
-# ["foo", x = 3, y = (1L 2L), z = 10]
-discard_at(co, 1:100)
-# []
-
-discard(co, NULL, 1:2, 1:3, 1:4)
-# ["foo", x = 3, z = 10]
+discard_at(co, 1, "a")
+# ["foo", x = 3, y = (1L 2L), z = 10]
+discard_at(co, 1:100)
+# []
+
+discard(co, NULL, 1:2, 1:3, 1:4)
+# ["foo", x = 3, z = 10]
-
-
-Combine containers
+
+
Combine containers
+
The update function is used to combine/merge two containers.
-c1=container(1, b =2)
-c2=container( b =0, c =3)
-
-update(c1, c2)
-# [1, b = 0, c = 3]
-update(c2, c1)
-# [b = 2, c = 3, 1]
+c1=container(1, b =2)
+c2=container( b =0, c =3)
+
+update(c1, c2)
+# [1, b = 0, c = 3]
+update(c2, c1)
+# [b = 2, c = 3, 1]
With the container package this function is also provided for base R lists.
Don’t bother using the container framework if speed is of high importance. An exception is the dict.table class, which is very fast as it is based on data.table. Other than that, if computation speed is critical for your application, we refer you to using base R list or packages that were optimized for performance, such as the collections package.
+
+
When not to use container
+
+
Don’t bother using the container framework if speed is of high importance. An exception is the dict.table class, which is very fast as it is based on data.table. Other than that, if computation speed is critical for your application, we refer you to using base R list or packages that were optimized for performance, such as the collections package.
-
-
-When to use container
+
+
When to use container
+
Consider using the container framework over base list if you are looking for …
Furthermore consider using dict.table for a flexible and robust way to manage data columns of data.tables.
-
-
-container in interactive R session
+
+
container in interactive R session
+
In an interactive R session a container can be used similar to a base R list, but also provides some extra features. For easier typing it’s recommended to use the shorter cont.
-library(container)
-co=cont(a =1, b =1:10)# same as co = container(a = 1, b = 1:10)
+library(container)
+co=cont(a =1, b =1:10)# same as co = container(a = 1, b = 1:10)
The container print method is designed to be very compact.