BIDSMap {bidsr} | R Documentation |
Low-level nested map to store key-value data with inherited structure
Description
Low-level nested map to store key-value data with inherited structure
Usage
BIDSMap(parent = NULL, search_depth = BIDS_MAP_MAX_DEPTH())
Arguments
parent |
|
search_depth |
integer maximum search depths; default is |
Value
A 'BIDSMap'
object.
Author(s)
Zhengjia Wang
Examples
root_map <- BIDSMap()
root_map$key1 <- 1
root_map$key2 <- 2
names(root_map)
child_map <- BIDSMap(parent = root_map)
child_map$key3 <- 3
names(child_map)
child_map$key1
child_map$key2
# mask key2
child_map$key2 <- "a"
child_map
root_map$key2
child_map$key2
# nested maps
grand_child <- BIDSMap(parent = child_map)
# value comes from child map
grand_child$key2
# remove key2 from child map
child_map@impl$remove("key2")
# key2 is from root map now
grand_child$key2
[Package bidsr version 0.1.0 Index]