Description Details Slots Author(s) See Also Examples
A S4 class for storing activity-space data; Contains information of one individual person
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.
data
an object of list containing ASpace object.
attr
an object of list containing metadata.
sp
an object of spatialpolygon or spatialpoint class data.
Seong-Yun Hong (syhong@khu.ac.kr)
ASpace
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.