How to measure differences in spatial densities or organisation of individuals on a plane in R?

I have two distinct datasets which look like this:

   identity   x-pos y-pos
1:     Z      0.5   0.7
2:     B      0.1   0.0
3:     C      4.6   2.5
4:     D      5.6   5.0
5:     A      0.2   1.0
6:     P      0.4   2.0

Here, the each object with a unique identity is positioned on a 2d plane and the coordinates are denoted by x-pos y-pos (in micrometers)

What I want to be able to do is to measure if objects have differences in spatial positioning/ organisation in the two datasets? This could be differences in clustering, for instance more clusters in one dataset than the other.

or it could be if the radius of each cluster in a dataset is higher than the other.

or there are more objects within a defined radius in one dataset than the other?

Is there a simple way/ r package to execute this in?


How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum