# see ?changeAttribute for more information
# Read Shapefile:
library(maptools)
library(spatstat)
xx <- readShapeLines(system.file("shapes/fylk-val.shp", package="maptools")[1],
proj4string=CRS("+proj=utm +zone=33 +datum=WGS84"))
xx_psp <- as.psp(xx) # slow for bigger shapefiles, so take it out of the function
# if object_psp is not given, it will be calculated each time...
plot(xx)
showAttribute(xx)
showAttribute(xx, xx_psp)
showAttribute(xx, xx_psp, 3:6)
showAttribute(xx, xx_psp, notify=FALSE) # Finish with "Enter"
Run the code above in your browser using DataLab