Learn R Programming

lawn (version 0.1.7)

lawn_point: Create a point

Description

Create a point

Usage

lawn_point(x, properties = NULL)

Arguments

x
A pair of points in a vector, list or json, of the form e.g., c(longitude,latitude)
properties
A list of properties. Default: NULL

Value

a data-Point feature

See Also

Other data functions: lawn_featurecollection, lawn_filter, lawn_linestring, lawn_polygon, lawn_random, lawn_remove, lawn_sample

Examples

Run this code
lawn_point(c(-74.5, 40))
lawn_point(list(-74.5, 40))
lawn_point('[-74.5, 40]')
lawn_point(c(-74.5, 40), properties = list(name = 'poly1', population = 400))

# Make a FeatureCollection
lawn_featurecollection(lawn_point(c(-74.5, 40)))

Run the code above in your browser using DataLab