Hi Carolina
I received your data set in a private mail. I read your data set and understood your problem.
Your data are located in the sea on the border of the Chilean coast. Note that this coast is extremely elongated and the band where the measurements are located is very thin.
Moreover the coast is not rectilinear. Locally and for a given year, the data set presents a croissant shape. Then the center of gravity (obtained using SI.cgi() function) lies on the continent. This is geometrically correct. Nothing in the algorithm prevents from this possibility.
The following picture demonstrates the data set (displayed in black), the coast line and the center of gravity.