recombine_with_sep_closure {libbib} | R Documentation |
Return a function that will combine/contatenate a vector
Description
This function takes and optional separator, and returns
a function that takes a vector and paste
s the
elements of that vector together
Usage
recombine_with_sep_closure(sep = ";")
Arguments
sep |
A character to use in between the elements (default is a semicolon character) |
Details
Can be used as a reduction function in split_map_filter_reduce
Value
Returns a closure/function
See Also
Examples
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"
[Package libbib version 1.6.4 Index]