library(rgdal)
library(rmapshaper)
library(httr)

# Load the spatial dataframe
tmp <- tempfile()

httr::GET("http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip", write_disk(tmp))

unzip(tmp, exdir = 'ne_50m_admin_0_countries')

world <- readOGR("./ne_50m_admin_0_countries", 'ne_50m_admin_0_countries', verbose = FALSE)

# Use ms_simplify to reduce the size of the spatial dataframe.
world <- ms_simplify(world)