nds_create_points: Create a sf object with point geometry

View source: R/nds_create.R

nds_create_pointsR Documentation

Create a sf object with point geometry

Description

This function creates a sf object using the point geometry, based on the NDS-BR naturalistic data (see nds_load_data).

Usage

nds_create_points(data, x, y, valid = "all")

Arguments

data

A data.frame or tibble object with coordinates.

x

Data attribute with x coordinates.

y

Data attribute with y coordinates.

valid

Option to select all data or valid data ("all", "yes").

Details

nds_create_points takes the naturalistic data as input and creates a point spatial object. x and y arguments considers longitude and latitude, respectively. It is possible to filter only valid time data using the valid parameter. In it's default, the function transforms all data, including invalid times.

Value

A sf object with point geometry

See Also

nds_create_lines

Examples

path <- system.file("extdata", package = "ndsbr")
nds_data <- nds_load_data("driver", path)
nds_create_points(nds_data, x = LONG, y = LAT)

pabsantos/ndsbr documentation built on June 13, 2024, 3:47 a.m.