문제

I am still a beginner to R and I have the following problem. Any tips will be highly appreciated - it will be a big help to start off. I have a road shapefile for one country in ArcGIS, that I would like to use as a network variable in R to apply network K-function (look for point randomness on the network using spatstat package). I have never worked with this type of problem before in R and I can't figure out how to convert the vector line dataset into network variable in R. I tried to used the shapefile package, but after reading the .shp, .shx and .dbf files, I don't know how it can be used any further.

도움이 되었습니까?

해결책

The comments above are not correct.

In the spatstat package, first convert your shapefile to an object of class "psp" (planar segment pattern) as explained in the accompanying vignette on shapefiles.

Then use the function as.linnet to convert the "psp" object to a linear network object of class "linnet".

For more explanation, see chapter 17 of the spatstat book.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top