I have a shapefile from countries downloaded from here . I can build it in R using
countries <- readOGR("shp","TM_WORLD_BORDERS-0.3",encoding="UTF-8",stringsAsFactors=F) par(mar=c(0,0,0,0),bg=rgb(0.3,0.4,1)) plot(countries,col=rgb(1,0.8,0.4))
Now I want to build it in spelling projection (Earth visible from space), so I'm trying
countries <- spTransform(countries,CRS("+proj=ortho +lat_0=-10 +lon_0=-60"))
I also played with the parameters x_0 and y_0 (as indicated here ), but always get the error:
non finite transformation detected: [1] 45.08332 39.76804 Inf Inf Erro em .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args, : failure in Polygons 3 Polygon 1 points 1 Alรฉm disso: Mensagens de aviso perdidas: In .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args, : 108 projected point(s) not finite
sometimes in the third polygon, sometimes in the 7th. Where does Inf come from? Do I need to change any parameter? I want to build a map like this

but focused on South America. Thanks for your help!