arcgisbinding (version 1.0.1.229)

arc.select: Load dataset to data.frame

Description

Load dataset to a standard data frame.

Usage

arc.select(object, fields, where_clause, selected, sr, ...)

# S4 method for arc.table arc.select(object, fields, where_clause, selected, sr, ...)

Arguments

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 (default: object@sr)

...

Additional arguements (currently ignored)

Value

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

See Also

arc.open

Examples

Run this code
# NOT RUN {
## 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)

# }

Run the code above in your browser using DataLab