I am using spatstat package in R to read my road network shapefile which also has some additional attributes.
When i am reading my shapefiles and converting them to as.psp(before I make them an object of linnet), I am getting n columns of data frame discarded. I do not understand why? The columns being discarded are my covariates for a linear network, so I am not able to bring them into my analysis.
Could someone give me an idea why this happens and how to correct it?
Why it happens:
I would guess that we (
spatstatauthors) need to spend a bit of time discussing with themaptoolsguys how to handle the additional info in theSpatialLinesDataFrameobject, and we haven't done that yet.How to correct it:
You have to write some code on your own at the moment. You can extract the data from
SpatialLinesDataFrameobject by accessing the@dataslot. Please provide specific data and how you need to use the additional data (what format do you need it in) if you need more help. You can find a few helpful commands here: https://cran.r-project.org/web/packages/spatstat/vignettes/shapefiles.pdf