'error in installing library(geojsonio) R programming

I am trying to install library(geojsonio) in R but I am getting this error

Error: package or namespace load failed for ‘geojsonio’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘foreign’



Sources

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

Source: Stack Overflow

Solution Source