Combine tibbles with mismatching column types

Trying to combine two tibbles that should have the same column types, but for some reason don’t? bind_rows() throwing up an error? I’ve written a function that might help…

bodge_rows = function(dfs, ...){
	bfs = lapply(dfs, FUN = function(X) mutate_all(X, .funs = as.character))
	out = bind_rows(bfs, ...) %>% type_convert(...)
	return(out)
	}

Leave a comment...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s