ASpaces-class: Class ASpaces

Description Details Slots Author(s) See Also Examples

Description

A S4 class for storing activity-space data; Contains information of one individual person

Details

The slot 'data' holds a list of ASpace objects (i.e., activity space information for an individual).

The slot 'attr' has supplementary information about the data. For example, it may contain the name of the survey, the date it was conducted, or the code book for the variables.

The slot 'sp' contains spatialpolygon or spatialpoint class data that can indicate the specific location of o_zone and d_zone in trip.

Slots

data

an object of list containing ASpace object.

attr

an object of list containing metadata.

sp

an object of spatialpolygon or spatialpoint class data.

Author(s)

Seong-Yun Hong (syhong@khu.ac.kr)

See Also

ASpace

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#example of creating ASpace class
#creates sample info data
testinfo <- list()

#creates sample trip data
testtrip <- data.frame(tr_id = 1:10, tr_seq = rep(NA, 10), purpose = rep(NA, 10),
                      mode = rep(NA, 10), o_type = rep(NA, 10), 
                    o_time = c(200,300,400,500,600,700,800,900,1000,1100),
                    o_zone = c(1,2,3,4,5,6,5,4,3,2),
                    d_type = rep(NA, 10),
                    d_time = c(300,400,500,600,700,800,900,1000,1100,1200),
                    d_zone = c(2,3,4,5,6,5,4,3,2,1))
                    
#constructs an object of class 'ASpace'
testASpace <- new("ASpace", info = list(id = 1), trip = testtrip)

#constructs an object of class 'ASpaces'
testtASpaces <- new("ASpaces", data = list(testaspace), sp = testshp)

syunhong/slice documentation built on Feb. 7, 2021, 4:55 p.m.