See [wiki:"EcomsUdg/RPackage/Examples/pointSelection"].