freebase icon indicating copy to clipboard operation
freebase copied to clipboard

Type save mappers should wrap vapply and not lapply

Open s-fleck opened this issue 7 years ago • 1 comments

The type save mappers should probably wrap around vapply() instead of lapply() with coercion.

Something like: map_chr <- function(.x, .f, ...) vapply(.x, .f., character(1), ...) etc...

I am not 100% sure how purrr::map_chr() behaves different than vapply(). I am currently a bit more busy than I thought, but if the issue stays open long enough, i'll look into them myself eventually.

s-fleck avatar Jun 07 '18 20:06 s-fleck

I'm in violent agreement on this. It was just easier to bang out the apply versions. It's def a gd idea whichever of us gets time. And, it's also (slightly) faster, too.

hrbrmstr avatar Jun 08 '18 02:06 hrbrmstr