inherited_stfdf: Internal: Class inherited stfdf

Description Usage Arguments Objects from the Class Slots Methods Author(s) Examples

View source: R/class_stfdf.R

Description

This class is an inherited STFDF from the packages spacetime. STFDF is for spatio-temporal data with a full data frame. It shows n spatial points and m times. Foreach location and time exists observations. It deals with spatio-temporal data and provides special time series analysis. The object of class inherited_stfdf contains one stfdf with the main-data: spatial data of package sp and temporal informations of class xts. The actual data is stored in the form of a data.frame. Furthermore it contains two stfdf-objects with the 'ValueIDs' and the 'DerivedFromIDs' and also one data.frame with the Meta-informations.

Usage

1
2
3
4
  inherited_stfdf(sp, time, data, endtime,
					ValueIDs, DerivedFromIDs, MetadataRel, Metadata)
  ## S4 method for signature 'inherited_stfdf'
x[i, j, ..., drop = TRUE]

Arguments

sp

object of class Spatial, with n elements

time

object holding time information, of length m

endtime

vector of class POSIXct, end points of time intervals; if not specified the time intervals are choose by default, when intervals are regular delta

data

data frame with n*m observations

ValueIDs

an object of class STFDF; see STFDF, which contains the ID's of the measured values

DerivedFromIDs

an object of class STFDF; see STFDF, which contains the ID's of the measured values

MetadataRel

an object of class STFDF; see STFDF, which contains the metadata-ids for build a relationship with the dataValues

Metadata

an object of class data.frame; see STFDF, which contains metadata of measurements, e.g. variablename, methods, etc.

x

an object of class inherited_stfdf

i

variety of spatial entities

j

range of temporal entities

...

selection of attribute(s)

drop

has no effect

Objects from the Class

Objects of this class represent full space/time data with a full grid (or lattice) layout

Slots

sp:

spatial object; see ST-class

time:

an object of class xts; see xts

data:

data.frame, which holds the measured values the measured values; space index cycling first, time order preserved

endtime:

it is a vector of class POSIXct. It contains end points of time intervals

ValueIDs:

an object of class STFDF; see STFDF, which contains the ID's of the measured values

DerivedFromIDs:

an object of class STFDF; see STFDF, which contains the ID's of the measured values

MetadataRel:

an object of class STFDF; see STFDF, which contains the metadata-ids for build a relationship with the dataValues

Metadata:

an object of class data.frame; see STFDF, which contains metadata of measurements, e.g. variablename, methods, etc.

Methods

[

signature(x = "inherited_stfdf"): selects location, times and variables

==

signature(e1="inherited_stfdf",e2="inherited_stfdf"): compares two inherited stfdf's

Author(s)

Dominik Reusser

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# look at documentation of addDataValues. Import more than one location to execute the example.
# when you use getDataValues the method return an inherited_stfdf
example(addDataValues)
inDB = getDataValues()

# Select data
#You can selected the data by using numerics and characters.
#In the following code line 'inDB' is sub-setted to the 
#second and third location, the first twenty dates and the temperature.
#Advice: The variable must have the correct term. For support
# look at the column name of inDB@data.

selectedData = inDB[1, 1:10, "Distance"]

#Furthermore you can miss out some parameters:
selectedData2 = inDB[1,10:10]
selectedData3 = inDB[,10:10]

#Attention: if the dataset contains only one location 
#(or it is subset only one point) it's impossible 
#to get a inherited spacetime-object. So you get a object of xts.
#If only one time is selected you get a SpatialPointsDataFrame.

#The inherited stfdf-data can visualized in different plots. For example:

stplot(inDB, mode='tp', type = 's')
stplot(inDB, mode='xt')


# Further you can access the slots of object by take advantage of the '@'.
inDB@Metadata
inDB@sp
inDB@time
inDB@data

RObsDat documentation built on May 29, 2017, 12:07 p.m.