createPoints: Create points data

View source: R/createPoints.R

createPointsR Documentation

Create points data

Description

Create sf points data by data frame with coordinates

Usage

createPoints(XY.data, crs = NULL, basemap = NULL)

Arguments

XY.data

Data frame of points;must (at least) contain a column of x coordinate called 'x', and a column of y coordinate called 'y';and other column if needed such as 't' (time), 'Rj' (reproductive numbers ).

crs

Coordinate reference system of data points: numeric (EPSG code), object of class 'crs', or input string for st_crs; if NULL, using CRS of basemap, or using WGS84 (EPSG:4326).

basemap

Object of class 'sf'; reference crs to create points on the crs of this basemap

Examples

data("EpiTrans")

points = RndPts[,2:3]

createPoints(points,crs = 4326,basemap = Taiwan)

wenlab501/EpiTrans documentation built on July 8, 2022, 9:14 a.m.