Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 4201d79

Browse files
author
Raphael Sonabend
authored
Merge pull request #7 from xoopR/cran_fixes
Cran fixes
2 parents 0765268 + 99f5754 commit 4201d79

10 files changed

+118
-11
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: param6
22
Title: A Fast and Lightweight R6 Parameter Interface
3-
Description: By making use of {set6}, alongside the S3 and R6 paradigms, this package provides a fast and lightweight R6 interface for parameters and parameter sets.
3+
Description: By making use of 'set6', alongside the S3 and R6 paradigms, this package provides a fast and lightweight R6 interface for parameters and parameter sets.
44
Version: 0.1.0
55
Authors@R:
66
person(given = "Raphael",

R/Dictionary.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ Dictionary <- R6Class("Dictionary",
8989

9090
#' @description Prints dictionary.
9191
#' @param n (`integer(1)`) \cr
92-
#' Number of items to print on either side of elipsis.
92+
#' Number of items to print on either side of ellipsis.
9393
print = function(n = 2) .Dictionary__print(self, private, n),
9494

9595
#' @description Summarises dictionary.
9696
#' @param n (`integer(1)`) \cr
97-
#' Number of items to print on either side of elipsis.
97+
#' Number of items to print on either side of ellipsis.
9898
summary = function(n = 2) .Dictionary__summary(self, private, n),
9999

100100
#' @description Merges another dictionary, or list of dictionaries, into

R/Dictionary_S3methods.R

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
1-
# FIXME - DOCUMENT
1+
#' @title Extract an element from a Dictionary
2+
#' @description This is simply a wrapper around `[Dictionary]$get_list(i)`
3+
#' @param object ([Dictionary])
4+
#' @param i (`character()`) \cr
5+
#' Keys of items to get.
26
#' @export
37
`[.Dictionary` <- function(object, i) {
48
object$get_list(i)
59
}
610

7-
# FIXME - DOCUMENT
11+
#' @title Get length of a Dictionary
12+
#' @description This is simply a wrapper around `[Dictionary]$length` to get the
13+
#' number of elements in a [Dictionary].
14+
#' @param x ([Dictionary])
815
#' @export
916
length.Dictionary <- function(x) {
1017
x$length
1118
}
1219

13-
# FIXME - DOCUMENT
20+
#' @title Summarise a Dictionary
21+
#' @description This is simply a wrapper around `[Dictionary]$summary(n)`.
22+
#' @param object ([Dictionary])
23+
#' @param n (`integer(1)`) \cr
24+
#' Number of items to print on either side of ellipsis.
25+
#' @param ... (`ANY`) \cr Other arguments, currently unused.
1426
#' @export
1527
summary.Dictionary <- function(object, n = 2, ...) {
1628
object$summary(n = n)
1729
}
1830

19-
# FIXME - DOCUMENT
31+
#' @title Create a string representation of a Dictionary
32+
#' @description Creates a string representation of a [Dictionary] used in
33+
#' printing.
34+
#' @param x ([Dictionary])
35+
#' @param n (`integer(1)`) \cr
36+
#' Number of items to print on either side of ellipsis.
37+
#' @param ... (`ANY`) \cr Other arguments, currently unused.
2038
#' @export
2139
as.character.Dictionary <- function(x, n = 2, ...) { # nolint
2240
keys <- x$keys
@@ -35,7 +53,10 @@ as.character.Dictionary <- function(x, n = 2, ...) { # nolint
3553
return(paste0("{", string, "}"))
3654
}
3755

38-
# FIXME - DOCUMENT
56+
#' @title Concatenate multiple Dictionary objects
57+
#' @description Creates a new [Dictionary] from the elements of provided
58+
#' [Dictionary] objects, first checks keys are unique.
59+
#' @param ... ([Dictionary]) \cr Dictionaries to concatenate.
3960
#' @export
4061
c.Dictionary <- function(...) {
4162
x <- list(...)

man/Dictionary.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/as.character.Dictionary.Rd

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/c.Dictionary.Rd

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/length.Dictionary.Rd

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/param6-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sub-.Dictionary.Rd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/summary.Dictionary.Rd

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)