R language packages installation failed: Error in install.packages: error reading from connection

Failed to download and install “SP” package:

Solution:
1. If the download is unsuccessful, switch the default download image of Rstudio to the domestic download image;


2. There are several domestic download images, if not, try more times. I chose the download image of Peking University;
3. Enter: install. Packages (“sp”) and wait for successful installation.

Read More: