stamp_set() makes use of stamp_get() and stores the stamp
into the .stamp environment, which can be accesses via stamp_call() or
stamp_env(). stamp_call() retrieves one single stamp. stamp_env()
display all the stamps available in the .stamp env.
Arguments
- x
An arbitrary R object which will then be passed to the base::serialize function
- st_name
character: Name of stamp to be set or called in .stamp env.
- stamp
previously calculated stamp with stamp_get.
- verbose
logical: whether to display additional information. This could be changed in option
"stamp.verbose". Default isTRUE- replace
Logical: if TRUE and
st_namealready exists in.stampenvironment, it will be replaced with new stamp. IfFALSEit gives an error. Default isFALSE- ...
arguments passed on to
stamp_get()
Value
invisible stamp from stamp_get() but it can now be called with stamp_call()
list with stamp values
names of stamps available in .stamp env. If no stamp is available, it returns an invisible character vector of length 0.
See also
Other stamp functions:
stamp_confirm(),
stamp_get(),
stamp_read(),
stamp_save(),
stamp_time(),
stamp_x_attr()
Examples
stamp_env()
#> ℹ no stamps in .stamp environment
x <- data.frame(a = 1:10, b = letters[1:10])
stamp_set(x, st_name = "xts")
stamp_call("xts")
#> $stamps
#> $stamps$a
#> [1] "53cc5bfe9b7ff0984828a89b23baba81"
#>
#> $stamps$b
#> [1] "ec07d1f59ebe8e279c9900e255a5cffb"
#>
#>
#> $time
#> $time$tz
#> [1] "UTC"
#>
#> $time$tformat
#> [1] "%Y%m%d%H%M%S"
#>
#> $time$usetz
#> [1] FALSE
#>
#> $time$st_time
#> [1] "20230202222545"
#>
#>
#> $algo
#> [1] "spookyhash"
#>
y <- data.frame(a = 5:10, b = letters[5:10])
stamp_set(y, st_name = "yts")
stamp_env()
#> [1] "yts" "xts"