- This topic has 2 replies, 3 voices, and was last updated 8 months ago by
Chawarat Rotejanaprasert.
-
AuthorPosts
-
-
2024-07-28 at 7:46 pm #45048
Nichcha Subdee
ParticipantI encountered several issues while completing assignment 1.2, including both issues that Soe mentioned. Additionally, I faced a problem when trying to install the ‘maptools’ library. When I attempted to install the library, RStudio displayed a message indicating that ‘maptools’ is not available for my R version [R version 4.4.1 (2024-06-14 ucrt)].
Here is the message I received:
=================================================================================
> install. Packages(“maptools”)
Installing package into ‘C:/Users/prize/AppData/Local/R/win-library/4.4’
(as ‘lib’ is unspecified)
Warning in install. Packages :
package ‘maptools’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
==================================================================================
I was so unsure how to resolve this issue and the deadline was approaching, so I searched for a similar library that could perform the same functions as ‘maptools.’ I found that the ‘maps’ library could produce the adjacency matrix (Figure 6.5) as well. Therefore, I used the ‘maps’ library instead of ‘maptools’ and ran the rest of the code to complete assignment 1.2. -
2024-07-28 at 11:37 pm #45050
Soe Htike
ParticipantKo Phyo downloaded maptools package from CRAN archives. We manually installed it in our updated R Studio. It worked fine but showed warning messages like “it won’t be available for so long in the future” or something like that.
I searched for updated packages for maptools and installed “sp” and “terra,” but none of them worked with the codes. So, only manually installing map tools finally saved all four of us. Kudos to Ko Phyo for his initiative. -
2024-07-31 at 2:11 pm #45076
Chawarat Rotejanaprasert
KeymasterThe main task of the ‘maptools’ package is to use the function ‘readShapePoly’ to read a shapefile. If you encounter issues with ‘readShapePoly’ or the ‘maptools’ package, there are alternative packages and functions you can try. For instance, you can use the ‘shapefile’ function from the ‘raster’ package. Additionally, you can download the ‘maptools’ package directly from CRAN, as Ko Phyo did.
-
-
AuthorPosts
You must be logged in to reply to this topic. Login here