rapply(object, f, classes = “ANY”, deflt = NULL,
how = c(“unlist”, “replace”, “list”), …)
how = “replace” , each element of object which is not itself list-like and has a class included in classes is replaced by the result of applying f to the element.
how = “list” or how = “unlist”, conceptually object is copied, all non-list elements which have a class included in classes are replaced by the result of applying f to the element and all others are replaced by deflt. Finally, if how = “unlist”, unlist(recursive = TRUE) is called on the result.