I have multiple point shapefiles with 20,000 - 100,000 points and I would like to create an outline/polygon from them using R. There may be holes in the middle of the polygon which I want outlined as well. I have posted pictures of how I want this to look. I have searched a lot for an answer to this using R and haven't found one that has worked. Many other examples I see don't follow the outline as closely as I would like. The polygon that I did get to work came from ArcGIS using the aggregate points (Cartography) tool with a 10 meter distance, but I want to use R.
ye <- read.csv(ye1,header = F, stringsAsFactors = F)
ye$gid <- 1
new_names <- c("easting", "northing","lat","long","yield","moisture","swath","distance","flow","interval","agl","transect","gpstime","utmzone","rmcode","gid")
names(ye) <- new_names
ye_shp <- SpatialPointsDataFrame(ye[,1:2],data = ye,proj4string = CRS("+proj=utm +zone=14 +datum=NAD83 +units=m +no_defs +ellps=GRS80"))