Questions tagged [r-maptools]

The R package maptools provides a set of tools for manipulating and reading geographic data, in particular ESRI shapefiles.

The R package maptools is a set of tools for manipulating and reading data, in particular s. The package also provides interface wrappers for packages such as PBSmapping, spatstat, maps, RArcInfo, tmap, , , and others.

Repositories

Vignettes

Other resources

Related tags

157 questions
0
votes
1 answer

Merge polygons and plot using spplot()

I would like to merge some regions in gadm data and then plot the map. So far I have the…
Tomas Greif
  • 21,685
  • 23
  • 106
  • 155
0
votes
1 answer

R Null results in dataframe subset

In R, I have a loop. I would like to subset a dataframe by the variable in the loop. I would like my code to look like this: library(maptools) for(theMonth in 600: 0) { Inspections.mp <- readShapeLines("InspDates2") counties.mp <-…
ike
  • 126
  • 8
0
votes
1 answer

Loops for making maps in r

I have a data frame with 500 species and 25,000 point locality observations of the various species. I would like to make individual species point maps, each point on the map is an occurrence of the species. Because there are so many maps to make, I…
I Del Toro
  • 913
  • 4
  • 15
  • 36
0
votes
1 answer

RPy2 Convert Dataframe to SpatialGridDataFrame

how can a Dataframe be converted to a SpatialGridDataFrame using the R maptools library? I am new to Rpy2, so this might be a very basic question. The R Code is: coordinates(dataf)=~X+Y In Python: import rpy2 import rpy2.robjects as robjects r =…
-1
votes
1 answer

rworldmap: plot two maps using the same palette

I want to plot two different Eurasian maps using the same palette. My dataframe is like: head(df) d1 d2 country 1 4.4 14.2 ALB 2 2.9 5.2 AND 3 9.9 36.9 ARM 4 5.6 69.0 AZE 5 2.9 7.3 AUT 6 8.1 9.3 BEL so on.. for…
-1
votes
1 answer

Error adding scale bar with map.scale

I manage to create a map and even include a north arrow, but can't get the map.scale to work and getting this kind of error: Error in map.scale(x = -83, y = 12, ratio = FALSE, relwidth = 0.2, cex = 0.6) : unused arguments (ratio = FALSE,…
CSM
  • 1
-1
votes
1 answer

Maptools: Plotting different geographic groups with different colors

I have a dataset with biological groups and its geographic information: results2 ID Latitude Longitude A -3,5 -39,5833 A -7,0167 -37,9667 A -9,2258 -43,4631 B -16,6667 -49,5 B -15,4333 -55,75 B -19,0333 -57,2167 C -29,2 …
1 2 3
10
11