Use the sf
package function st_read
, then rbind
them all together, and st_write
it out.
It's not possible to mix points, lines, polygons in a shapefile - you can have only one type. Shapefiles pre-date the current standards for simple features types (i.e. POLYGON and MULTIPOLYGON are importantly different), they don't have an official mechanism for CRS (.prj is a post-hoc convention not in the standard), and use of dBase is hopelessly limiting for storing data.
Don't create shapefiles. There are good formats that support those things we always need (simple features, projection metadata, reliable data storage and naming, styling and format), the best ones are GeoPackage and MapInfo (MIF).
If you can transfer direct to a database do that instead, if it's over the web consider GeoJSON (but you'll have to be in or transform to long-lat). If it's for other R users create a package and use the package data format, with a data-raw/script to build those from the KML.