Questions tagged «syntax»

2
R中的SpatialPointsDataFrame属性和运算符
我已经SpatialPointsDataFrame使用spR中的包创建了一个类型为对象的对象。但是,对于@, $, . and []操作符以及何时使用它们来访问对象的不同属性,我感到困惑。这是我的示例代码: library(sp) library(rgdal) #creating a SpatialPointsDataFrame with sample points in UTM x <- c(15.2, 15.3, 15.4, 15.5, 15.7) y <- c(50.4, 50.2, 50.3, 50.1, 50.4) v1 <- c(1.0, 2.0, 3.0, 4.0, 5.0) v2 <- c("a","b","b","c","a") attributes <- as.data.frame(cbind(v1,v2)) xy <- cbind(x,y) locationsDD <- SpatialPointsDataFrame(xy, attributes) proj4string(locationsDD) …
14 r  syntax 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.