sc_trip: Build a PATH from a raw data table.

Description Usage Arguments Value Examples

Description

Nominated columns will be used to find unique coordinates. All other columns belong on the path-link-vertex data. Currently this is to find a single path from a table of data. In future there will be methods for grouped data frames, and for other ways of declaring groupings at the path and object level.

Create a trip the sc way

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## S3 method for class 'data.frame'
sc_trip(x, ..., .group = NULL)

sc_trip(x, ..., .group = NULL)

sc_trip_(x, path_cols = character(), .group = NULL)

## S3 method for class 'data.frame'
sc_trip_(x, path_cols = character(), .group = NULL)

## S3 method for class 'tbl_sqlite'
sc_trip_(x, path_cols = character(), .group = NULL)

Arguments

x

input data

...

columns that are nominated as vertex coordinates

.group

group

path_cols

path columns

Value

'sc::PATH'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data("Seatbelts", package= "datasets")
apath <- sc_trip(as.data.frame(Seatbelts), front, rear, kms)
sc::PRIMITIVE(apath)
sc_trip(aurora) ## we can have pure topology
aurora$id <- 1:nrow(aurora)
aurora$g <- aurora$id %/% 7
## or more usually, nominate the geometric space in which the path turns
## everything else is kept on a link table to the path entities
sc_trip(aurora, LONGITUDE_DEGEAST, LATITUDE_DEGNORTH, DATE_TIME_UTC)
sc::PRIMITIVE(sc_trip(aurora, LONGITUDE_DEGEAST, LATITUDE_DEGNORTH, DATE_TIME_UTC))

mdsumner/sctrip documentation built on May 22, 2019, 5:06 p.m.