sample_locations_uniform: Sample from a particular polygon shapefile

Description Usage Arguments Value

View source: R/sample-locations.R

Description

Sample from a particular polygon shapefile

Usage

1
2
sample_locations_uniform(place_id, n_house, shapefile, noise = 0.001,
  shapefile_id = NULL)

Arguments

place_id

numeric specifiying the ID of the region we are subsampling

n_house

numeric indicating the number of households

shapefile

sp class with all of the locations for each place id

noise

numeric indicating how must noise to add to sampled points This is only used if the number of points to sample exceeds 100,000, in which case the spsample function takes too long. Instead, we sample 100,000 points, sample n_house from these 100,000, and then add random noise.

shapefile_id

optionally include a shapefile id for subsetting shapefile

Value

SpatialPoints object with coordinates for the n households


spew documentation built on Nov. 17, 2017, 7:36 a.m.