cutByShp: Clip A Data Frame by A Shapefile

Description Usage Arguments Value Examples

View source: R/cutByShp.R

Description

Clip a data frame by a shapefile

Usage

1
cutByShp(myshp, dat, lat.name, long.name)

Arguments

myshp

the shapefile (class SpatialPolygonsDataFrame) that must be based on WGS84 coordinate system

dat

the data frame to be cut that must include WGS84 lat/long coordinates

lat.name

the name of the column about latitude in dat

long.name

the name of the column about longitude in dat

Value

A subset of the data frame clipped by the shapefile

Examples

1
cutByShp(myshp = shp, dat = df, lat.name = 'Lat', long.name = 'Lon')

jianzhaobi/bjzresc documentation built on Feb. 14, 2021, 7:45 a.m.