R purrr - map_df()/map_dbl()/map_chr()
Base R’s lapply() always returns a list. You then coerce it to your desired type, often discovering type mismatches late in execution. The purrr approach enforces types immediately:
Base R’s lapply() always returns a list. You then coerce it to your desired type, often discovering type mismatches late in execution. The purrr approach enforces types immediately: