arc.data: Class "arc.data"

arc.dataR Documentation

Class "arc.data"

Description

arc.data class and methods

Usage

  
  ## S3 method for class 'arc.data'
x[i, j, drop]

### dplyr methods:
  ## S3 method for class 'arc.data'
filter(.data, ..., .dots)
  ## S3 method for class 'arc.data'
arrange(.data, ..., .dots)
  ## S3 method for class 'arc.data'
mutate(.data, ..., .dots)
  ## S3 method for class 'arc.data'
group_by(.data, ..., add)
  ## S3 method for class 'arc.data'
ungroup(x, ...)

Arguments

i, j, ...

indices specifying elements to subset

drop

if TRUE coerce the result to the lowest possible dimension and remove the geometry attribute

x

A arc.data object

.data

A arc.data object

.dots

other arguments (see package dplyr)

add

To add to the existing groups, use add = TRUE

Details

TODO arc.data object is data.frame with geometry attribute. To access geometry use arc.shape.

Extends

Class data.frame, directly.

dplyr methods

  • filter: Return rows with matching conditions

  • arrange: Arrange rows by variables

  • mutate, transmute: Add new variables

  • select: Select/rename variables by name

  • group_by: Group by one or more variables

  • slice: Select rows by position

  • distinct: Select distinct/unique rows

Note

You can display the arc.data object. Geometry information, first 5 and last 3 row will be showed.

See Also

arc.shape, arc.open, arc.select

Examples

  d <- arc.select(arc.open(system.file("extdata", "ca_ozone_pts.shp", package="arcgisbinding")))
  d
## Not run: 
geometry type   : Point
WKT             : PROJCS["USA_Contiguous_Albers_Equal_Area_Conic",GEOGCS["GCS_...
WKID            : 102003
    FID LATITUDE LONGITUDE ELEVATION   OZONE        X         Y    text
1     0  39.1447 -123.2065       194 0.04650 -2298092  515557.4 Value_0
2     1  39.4030 -123.3491       420 0.04969 -2301588  546772.7 Value_1
3     2  37.7661 -122.3978         5 0.05000 -2273948  347691.4 Value_2
4     3  37.9508 -122.3569        23 0.05799 -2264847  366623.2 Value_3
5     4  36.6986 -121.6354        36 0.05860 -2241776  214412.1 Value_0
... ...      ...       ...       ...     ...      ...       ...     ...
191 190  34.0598 -117.1462         0 0.16449 -1921585 -170440.0 Value_2
192 191  34.2412 -117.2756      1384 0.16470 -1928645 -148045.5 Value_3
193 192  34.1065 -117.2732         0 0.17360 -1931774 -162775.2 Value_0

## End(Not run)

# subset rows 1,3 and 5 with corresponding features
d135 <- d[c(1,3,5),]



# dplyr support
require("dplyr")
filter(d, ELEVATION > 1800)

#add new elevation column in meters
mutate(d, elevm = ELEVATION * 0.3048)


R-ArcGIS/r-bridge documentation built on May 3, 2024, 9:47 a.m.