Hi,
locator() returns wrong positions with RStudioIDE 2022.07.1 Build 554 on Windows 10 whereas the positions are OK with RGui 4.0.3. There is an issue in Github but it was closed.
> plot(c(-1, 1, 1, -1), c(-1, -1, 1, 1))
> locator(4)
$x
[1] -0.9726507 1.2523409 1.2503200 -0.9726507
$y
[1] -1.2502852 -1.2555507 0.9691093 0.9691093