| arc.select {arcgisbinding} | R Documentation |
Load dataset to a standard data frame.
arc.select(object, fields = "*", where_clause = "", selected = TRUE, sr = NULL)
object |
arc.dataset-class object |
fields |
string, or list of strings, containing fields to include (default: all) |
where_clause |
SQL where clause |
selected |
use only selected records (if any) when dataset is a layer or standalone table |
sr |
transform geometry to Spatial Reference |
arc.select returns a data.frame object (type of
arc.data).
If dataset includes the arc.feature attribute, the "shape" of class
arc.shape-class will be attached to the resulting
data.frame object.
## read all fields
ozone.file <- system.file("extdata", "ca_ozone_pts.shp",
package="arcgisbinding")
d <- arc.open(ozone.file)
df <- arc.select(d, names(d@fields))
head(df, n=3)
## read 'name', 'fid' and geometry
df <- arc.select(d, c('fid', 'ozone'), where_clause="fid < 5")
nrow(df)
## transform points to "+proj=eqc"
df <- arc.select(d,"fid", where_clause="fid<5", sr="+proj=eqc")
arc.shape(df)