View source: R/split-map-filter-reduce.R
recombine_with_sep_closure | R Documentation |
This function takes and optional separator, and returns
a function that takes a vector and paste
s the
elements of that vector together
recombine_with_sep_closure(sep = ";")
sep |
A character to use in between the elements (default is a semicolon character) |
Can be used as a reduction function in split_map_filter_reduce
Returns a closure/function
split_map_filter_reduce
paste
lambda <- recombine_with_sep_closure()
lambda(c(8, 6, 7)) # "8;6;7"
# directly
recombine_with_sep_closure()(c(8,6,7)) # "8;6;7"
lambda <- recombine_with_sep_closure(" ")
lambda(c("this", "that", NA,"the-other")) # "this that NA the-other"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.