diff --git a/404.html b/404.html index f9793ee8..8cee9aa4 100644 --- a/404.html +++ b/404.html @@ -13,13 +13,13 @@ - - - - + + + + - + License • mlr3miscLicense • mlr3misc @@ -10,7 +10,7 @@ mlr3misc - 0.11.0 + 0.12.0 + + + + + +
+
+
+ +
+

Covenience wrapper around dictionary_sugar_get and dictionary_sugar_mget to allow easier avoidance of of ID +clashes which is useful when the same object is used multiple times and the ids have to be unique. +Let <key> be the key of the object to retrieve. When passing the <key>_<n> to this +function, where <n> is any natural numer, the object with key <key> is retrieved and the +suffix _<n> is appended to the id after the object is constructed.

+
+ +
+

Usage

+
dictionary_sugar_inc_get(dict, .key, ...)
+
+dictionary_sugar_inc_mget(dict, .keys, ...)
+
+ +
+

Arguments

+
dict
+

(Dictionary)
+Dictionary from which to retrieve an element.

+ + +
.key
+

(character(1))
+Key of the object to construct - possibly with a suffix of the form _<n> which will be appended to the id.

+ + +
...
+

(any)
+See description of dictionary_sugar.

+ + +
.keys
+

(character())
+Keys of the objects to construct - possibly with suffixes of the form _<n> which will be appended to the ids.

+ +
+
+

Value

+ + +

An element from the dictionary.

+
+ +
+

Examples

+
d = Dictionary$new()
+d$add("a", R6::R6Class("A", public = list(id = "a")))
+d$add("b", R6::R6Class("B", public = list(id = "c")))
+obj1 = dictionary_sugar_inc_get(d, "a_1")
+obj1$id
+#> [1] "a_1"
+
+obj2 = dictionary_sugar_inc_get(d, "b_1")
+obj2$id
+#> [1] "c_1"
+
+objs = dictionary_sugar_inc_mget(d, c("a_10", "b_2"))
+map(objs, "id")
+#> $a_10
+#> [1] "a_10"
+#> 
+#> $c_2
+#> [1] "c_2"
+#> 
+
+
+
+
+ + +
+ + + + + + + diff --git a/reference/did_you_mean.html b/reference/did_you_mean.html index 6bc18b47..8583cae2 100644 --- a/reference/did_you_mean.html +++ b/reference/did_you_mean.html @@ -1,5 +1,5 @@ -Suggest Alternatives — did_you_mean • mlr3miscSuggest Alternatives — did_you_mean • mlr3misc @@ -10,7 +10,7 @@ mlr3misc - 0.11.0 + 0.12.0