'Error using packet 1 could not find function "sp.polygon"

I'm trying to add shp or rds file into my raster plot in R, but after that I get some error in a plot with this.

enter image description here

My script:

library(rasterVis)
levelplot(cape_bulanan, col.regions=colorRampPalette(c("Red","Yellow","Blue"))) + 
    latticeExtra::layer(sp.polygon(indo.rds, col = "black", fill = "transprent"))


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source