Summary.struct_list | R Documentation |
all, any, sum, prod, min, max, range
## S3 method for class 'struct_list'
Summary(..., na.rm = FALSE)
sum.test = function(..., na.rm=TRUE) {
# must use rlang::list2
l = rlang::list2(...)
return(purrr::reduce(l, `+.test`))
}
map_struct(1:10, ~ struct(a=.x,b=2,c=1:3,.class="test"))
min.test = function(..., na.rm=TRUE) {
l = rlang::list2(...)
}
# class(sum(z$b))
# sum(z$b, z$b)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.