arc.select {arcgisbinding}R Documentation

Load dataset to data.frame

Description

Load dataset to a standard data frame.

Usage

arc.select(object, fields = "*", where_clause = "", selected = TRUE,
  sr = NULL)

Arguments

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

Value

arc.select returns a data.frame object (type of arc.data).

Note

If dataset includes the arc.feature attribute, the "shape" of class arc.shape-class will be attached to the resulting data.frame object.

See Also

arc.open

Examples

## 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)

[Package arcgisbinding version 1.0.0.124 Index]