I want to install the package sp, but then R shows me this message:
> install.packages("sp")
Error in install.packages : Updating loaded packages
Have you tried restarting your R session? It works fine in my RStudio.
If you have issues installing the package from the CRAN Repository, try this:
devtools::install_github("edzer/sp")
It will return these outputs
Downloading GitHub repo edzer/sp@HEAD
√ checking for file 'C:\Users\Users\AppData\Local\Temp\RtmpSOAQPV\remotes242444575da6\edzer-sp-2ace7ca/DESCRIPTION' (952ms)
- preparing 'sp': (8.6s)
√ checking DESCRIPTION meta-information ...
- cleaning src
- checking for LF line-endings in source and make files and shell scripts (2s)
- checking for empty or unneeded directories
- looking to see if a 'data/datalist' file should be added
- building 'sp_1.4-5.tar.gz'
Installing package into ‘C:/Users/Users/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
* installing *source* package 'sp' ...
** using staged installation
** libs
*** arch - i386
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Rcentroid.c -o Rcentroid.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c gcdist.c -o gcdist.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c pip.c -o pip.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c pip2.c -o pip2.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c sp_xports.c -o sp_xports.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c surfaceArea.c -o surfaceArea.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c zerodist.c -o zerodist.o
/mingw32/bin/gcc -shared -s -static-libgcc -o sp.dll tmp.def Rcentroid.o gcdist.o init.o pip.o pip2.o sp_xports.o surfaceArea.o zerodist.o -LC:/PROGRA~1/R/R-41~1.0/bin/i386 -lR
installing to C:/Users/Documents/R/win-library/4.1/00LOCK-sp/00new/sp/libs/i386
*** arch - x64
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Rcentroid.c -o Rcentroid.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c gcdist.c -o gcdist.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c pip.c -o pip.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c pip2.c -o pip2.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c sp_xports.c -o sp_xports.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c surfaceArea.c -o surfaceArea.o
/mingw64/bin/gcc -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c zerodist.c -o zerodist.o
/mingw64/bin/gcc -shared -s -static-libgcc -o sp.dll tmp.def Rcentroid.o gcdist.o init.o pip.o pip2.o sp_xports.o surfaceArea.o zerodist.o -LC:/PROGRA~1/R/R-41~1.0/bin/x64 -lR
installing to C:/Users/Documents/R/win-library/4.1/00LOCK-sp/00new/sp/libs/x64
** R
** data
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'sp'
finding HTML links ... done
00sp html
CRS-class html
DMS-class html
GridTopology-class html
Line-class html
Line html
Lines-class html
Polygon-class html
Polygons-class html
Rlogo html
Spatial-class html
REDIRECT:topic coordinates<-,Spatial-method -> Spatial-class.html [ FAIL ]
REDIRECT:topic [[<-,Spatial,ANY,missing-method -> Spatial-class.html [ FAIL ]
REDIRECT:topic [<-,Spatial-method -> Spatial-class.html [ FAIL ]
REDIRECT:topic $<-,Spatial-method -> Spatial-class.html [ FAIL ]
SpatialGrid-class html
SpatialGrid html
SpatialGridDataFrame-class html
SpatialGridDataFrame html
SpatialLines-class html
SpatialLines html
SpatialLinesDataFrame-class html
SpatialMultiPoints-class html
REDIRECT:topic $<-,SpatialMultiPoints,character-method -> SpatialMultiPoints-class.html [ FAIL ]
SpatialMultiPoints html
SpatialMultiPointsDataFrame-class html
SpatialPixels-class html
SpatialPixelsDataFrame-class html
SpatialPoints-class html
REDIRECT:topic $<-,SpatialPoints,character-method -> SpatialPoints-class.html [ FAIL ]
SpatialPoints html
SpatialPointsDataFrame-class html
SpatialPolygons-class html
SpatialPolygons html
SpatialPolygonsDataFrame-class html
addattr html
aggregate html
as.SpatialPolygons.GridTopology html
as.SpatialPolygons.PolygonsList html
asciigrid html
bbox html
bpy.colors html
bubble html
char2dms html
compassRose html
coordinates-methods html
REDIRECT:topic coordinates<-,data.frame-method -> coordinates-methods.html [ FAIL ]
coordinates html
REDIRECT:topic coordinates<- -> coordinates.html [ FAIL ]
coordnames-methods html
REDIRECT:topic coordnames<- -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,SpatialPoints,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,SpatialMultiPoints,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,SpatialLines,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,Lines,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,Line,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,SpatialPolygons,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,GridTopology,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,SpatialGrid,character-method -> coordnames-methods.html [ FAIL ]
REDIRECT:topic coordnames<-,SpatialPixels,character-method -> coordnames-methods.html [ FAIL ]
degaxis html
dimensions html
disaggregate html
flip html
geometry-methods html
REDIRECT:topic geometry<- -> geometry-methods.html [ FAIL ]
REDIRECT:topic geometry<-,data.frame,Spatial-method -> geometry-methods.html [ FAIL ]
gridded-methods html
REDIRECT:topic fullgrid<- -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<- -> gridded-methods.html [ FAIL ]
REDIRECT:topic fullgrid<-,Spatial,ANY-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic fullgrid<-,SpatialGrid,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic fullgrid<-,SpatialGridDataFrame,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic fullgrid<-,SpatialPixels,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic fullgrid<-,SpatialPixelsDataFrame,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialGrid,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialGridDataFrame,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialPixels,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialPixelsDataFrame,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialPoints,list-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialPoints,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialPointsDataFrame,list-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,SpatialPointsDataFrame,logical-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,data.frame,GridTopology-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,data.frame,character-method -> gridded-methods.html [ FAIL ]
REDIRECT:topic gridded<-,data.frame,formula-method -> gridded-methods.html [ FAIL ]
gridindex2nb html
gridlines html
image html
is.projected html
REDIRECT:topic proj4string<- -> is.projected.html [ FAIL ]
REDIRECT:topic proj4string<-,Spatial,CRS-method -> is.projected.html [ FAIL ]
REDIRECT:topic proj4string<-,Spatial,character-method -> is.projected.html [ FAIL ]
loadmeuse html
mapasp html
merge html
meuse html
meuse.grid html
meuse.grid_ll html
meuse.riv html
over html
panel html
point.in.polygon html
polygons-methods html
REDIRECT:topic polygons<-,data.frame,SpatialPolygons-method -> polygons-methods.html [ FAIL ]
polygons html
REDIRECT:topic polygons<- -> polygons.html [ FAIL ]
REDIRECT:topic Previous alias or file overwritten by alias: C:/Users/Documents/R/win-library/4.1/00LOCK-sp/00new/sp/help/polygons.html
recenter-methods html
select.spatial html
sp-deprecated html
spChFIDs-methods html
REDIRECT:topic spChFIDs<- -> spChFIDs-methods.html [ FAIL ]
REDIRECT:topic spChFIDs<-,Spatial-method -> spChFIDs-methods.html [ FAIL ]
spDistsN1 html
spTransform html
spplot html
spsample html
stack html
surfaceArea html
zerodist html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (sp)
After the install finishes, load the package by
library(sp)
Otherwise, if it still return errors. Try downloading the package from here and install them to RStudio manually