I wish to make a web-app where the user clicks on the screen, and points appear on it. From this, I compute the centre of mass with respect to all these points. I was just wondering what function would allow me to click on the screen, and to have points appear? I'm aware that [Preformatted text](https://shiny.rstudio.com/gallery/plot-interaction-selecting-points.html) allows the user to draw boxes around points, so it seems possible. Any help would be greatly appreciated.