Hi, sample_real <- sample[, c(2,4)] writeOGR(sample_real, ".", "sample_real", driver="ESRI Shapefile")
should do the job. Kami gianni lavaredo wrote:
sorry for the easy questions but I have this problem. I had read Help but I didn't find this question. Sorry for desturbing but I am a brand new in R, sorry again # I have a shape file with 4 column (soil, ID, country, pH) sample <- readOGR(".", "sample") summary("sample") # I wish select only the ID (2 column) and pH (4 column) # in help I found this sw[1:3] for select the 1°,2°,3° columns, but I wish to select only the # 2° and 4° sample_real <- sample[?????] writeOGR(sample_real, ".", "sample_real", driver="ESRI Shapefile") thanks and sorry again for the question and for your time Gianni sampe <- [[alternative HTML version deleted]]------------------------------------------------------------------------_______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo