'Creating polygons from sparse data in R

I have a dataframe with coordinates for which I want to create polygons, the most normal is a polygon like the one I put in the first image:

enter image description here

But I'm looking for something different, more like this: enter image description here

As you can see, if the points are enough far, another polygon is created, is this possible in R? Thanks!

Here are the data csv



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source