Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在R中打印shp文件的1属性_R_Shapefile_Sf - Fatal编程技术网

在R中打印shp文件的1属性

在R中打印shp文件的1属性,r,shapefile,sf,R,Shapefile,Sf,我正试图从我的形状文件中选择并打印这9个属性中的一个,但似乎没有任何效果。 你能帮忙吗 如果您制作了一个完全可复制的示例,以便修复者可以运行代码并确保他们已经解决了问题,那么这会有所帮助 下面是一个示例,您必须根据自己的需要进行修改 library(sf) fname <- system.file("shape/nc.shp", package="sf") # read a shape file that comes with the sf pack

我正试图从我的形状文件中选择并打印这9个属性中的一个,但似乎没有任何效果。 你能帮忙吗


如果您制作了一个完全可复制的示例,以便修复者可以运行代码并确保他们已经解决了问题,那么这会有所帮助

下面是一个示例,您必须根据自己的需要进行修改

library(sf)
fname <- system.file("shape/nc.shp", package="sf") # read a shape file that comes with the sf package
nc <- st_read(fname)
plot(nc)  # plot all the data

如果您制作了一个完全可复制的示例,以便修复者可以运行代码并确保他们已经解决了问题,那么这会有所帮助

下面是一个示例,您必须根据自己的需要进行修改

library(sf)
fname <- system.file("shape/nc.shp", package="sf") # read a shape file that comes with the sf package
nc <- st_read(fname)
plot(nc)  # plot all the data

这太棒了,太棒了!!!非常感谢你,它成功了:这太棒了,太棒了!!!非常感谢,它成功了:欢迎来到stackoverflow。对于下一个问题,你应该考虑以下建议:为什么在提问时不上传代码/错误的图像?欢迎来到stackoverflow。对于下一个问题,你应该考虑以下建议:为什么在提问时不上传代码/错误的图像?