Package 'eoR'

Title: Data Management Package (Exposure and Occurrence Data in R)
Description: This data management package provides some helper classes for publicly available data sources (HMD, DESTATIS) in Demography. Similar to ideas developed in the Bioconductor project <https://bioconductor.org> we strive to encapsulate data in easy to use S4 objects. If original data is provided in a text file, the resulting S4 object contains all information from that text file. But the information is somehow structured (header, footer, etc). Further the classes provide methods to make a subset for selected calendar years or selected regions. The resulting subset objects still contain the original header and footer information.
Authors: Rainer Walke [aut, cre]
Maintainer: Rainer Walke <[email protected]>
License: GPL-3
Version: 0.4.0
Built: 2024-10-25 04:01:05 UTC
Source: https://github.com/cran/eoR

Help Index


EX1 class for HMD eposure files 1x1

Description

The class EX1 stores HMD exposure information in a systematic way.

The header-method gets the raw header information of an EX1 object

The ex1-method gets the exposure information of an EX1 object

The content-method gets the exposure table information of an EX1 object

The region-method gets the regional information of an EX1 object

The protocol-method gets the protocol information of an EX1 object

The Exposure1-constructor creates an EX1 object

The length-method gets the number of rows int the EX1 ex1 data.table

The selectYears-method gets a subset of an EX1 object

The readEX1x1-method reads all information from the file 1x1 exposure table

Usage

## S4 method for signature 'EX1'
header(object)

## S4 method for signature 'EX1'
ex1(object)

## S4 method for signature 'EX1'
content(object)

## S4 method for signature 'EX1'
region(object)

## S4 method for signature 'EX1'
protocol(object)

Exposure1(header, ex1, content, region, protocol)

## S4 method for signature 'EX1'
length(x)

## S4 method for signature 'EX1'
show(object)

## S4 method for signature 'EX1'
selectYears(object, selectYears)

readEX1x1(infile)

Arguments

object

EX1-object

header

vector

ex1

data.table

content

character

region

character

protocol

character

x

EX1-object

selectYears

vector

infile

character file name

Details

This EX1 class fits to Human Mortality Database (HMD) 1x1 period exposure tables. See https://www.mortality.org/ for data details. An EX1 instance stores the raw header, the content, the version protocol and regional information and the exposure table as a data.table object. The validation adds a pure numeric age AgeLow to the exposure table. Try demo(EX1) for a demonstration.

Value

The header-method returns the raw header information

The ex1-method returns the exposure table

The content-method returns the content information

The region-method returns the regional information

The protocol-method returns the protocol information

The Exposure1-constructor returns an EX1 object

The length-method returns the number of rows

The selectYears-method returns an EX1 object

The readEX1x1-method returns an EX1 object

Slots

content

describes the content

region

regional entity

header

includes the raw header information

ex1

stores the exposure table (data.table)

protocol

contains the protocol information

Examples

e1 <- readEX1x1(file.path(system.file(package="eoR"), "extdata", "DEUTNP.Exposures_1x1m.txt"))
header(e1)
ex1(e1)[, table(Year)]

AllGenerics

Description

The header-method gets the header of an object

The footer-method gets the footer of an object

The content-method gets the content of an object

The region-method gets the region of an object

The protocol-method gets the protocol of an object

The selectYears-method gets a subset of an object

The selectRegion-method gets a subset of an object

The lt1-method gets the life table lt1 of an LT1 object

The ex1-method gets the exposure table ex1 of an EX1 object

The rd1-method gets the regional death count table rd1 of an RD1 object

The rd1total-method gets the total sum death count table rd1total of an RD1 object

The re1-method gets the regional exposure table re1 of an RE1 object

The re1total-method gets the regional total sum exposure table re1total of an RE1 object

Usage

header(object)

footer(object)

content(object)

region(object)

protocol(object)

selectYears(object, selectYears)

selectRegion(object, selectRegion)

lt1(object)

ex1(object)

rd1(object)

rd1total(object)

re1(object)

re1total(object)

Arguments

object

object

selectYears

vector of integer

selectRegion

vector of character

Value

The header-method returns the header of an object

The footer-method returns the footer of an object

The content-method returns the content of an object

The region-method returns the region of an object

The protocol-method returns the protocol of an object

The selectYears-method returns a subset of an object

The selectRegion-method returns a subset of an object

The lt1-method returns the life table lt1 of an LT1 object

The ex1-method returns the exposure table ex1 of an EX1 object

The rd1-method returns the regional death count table rd1 of an RD1 object

The rd1-method returns the total sum death count table rd1total of an RD1 object

The er1-method returns the regional exposure table re1 of an RE1 object

The er1total-method returns the regional total sum exposure table re1total of an RE1 object


LT1 class for HMD life-tables 1x1

Description

The class LT1 stores HMD life table information in a systematic way.

The header-method gets the raw header information of an LT1 object

The lt1-method gets the life table information of an LT1 object

The content-method gets the life table information of an LT1 object

The region-method gets the regional information of an LT1 object

The protocol-method gets the protocol information of an LT1 object

The LTable1-constructor creates an LT1 object

The length-method gets the number of rows int the LT1 lt1 data.table

The selectYears-method gets a subset of an LT1 object

The readLT1x1-method reads all information from the file 1x1 period life table

Usage

## S4 method for signature 'LT1'
header(object)

## S4 method for signature 'LT1'
lt1(object)

## S4 method for signature 'LT1'
content(object)

## S4 method for signature 'LT1'
region(object)

## S4 method for signature 'LT1'
protocol(object)

LTable1(header, lt1, content, region, protocol)

## S4 method for signature 'LT1'
length(x)

## S4 method for signature 'LT1'
show(object)

## S4 method for signature 'LT1'
selectYears(object, selectYears)

readLT1x1(infile)

Arguments

object

LT1-object

header

vector

lt1

data.table

content

character

region

character

protocol

character

x

LT1-object

selectYears

vector

infile

character file name

Details

This LT1 class fits to Human Mortality Database (HMD) 1x1 period life tables. See https://www.mortality.org/ for data details. An LT1 instance stores the raw header, the content, the version protocol and regional information and the life table as a data.table object. The validation adds a pure numeric age AgeLow to the life table. Try demo(LT1) for a demonstration.

Value

The header-method returns the raw header information

The lt1-method returns the life-table

The content-method returns the content information

The region-method returns the regional information

The protocol-method returns the protocol information

The LTable1-constructor returns an LT1 object

The length-method returns the number of rows

The selectYears-method returns an LT1 object

The readLT1x1-method returns an LT1 object

Slots

content

describes the content

region

regional entity

header

includes the raw header information

lt1

stores the life table (data.table)

protocol

contains the protocol information

Examples

o1 <- readLT1x1(file.path(system.file(package="eoR"), "extdata", "DEUTNP.fltper_1x1m.txt"))
header(o1)
lt1(o1)[, table(Year)]

RD1 class for 'GENESIS-Tabelle: 12613-02-02-4'

Description

The class RD1 stores GENESIS table information in a systematic way.

The header-method gets the raw header information of an RD1 object

The footer-method gets the raw footer information of an RD1 object

The rd1-method gets the death count table information of an RD1 object

The rd1total-method gets the death count total sums table information of an RD1 object

The content-method gets the death count table information of an RD1 object

The region-method gets the regional information of an RD1 object

The protocol-method gets the protocol information of an RD1 object

The RegDeath1-constructor creates an RD1 object

The length-method gets the number of rows int the RD1 rd1 data.table

The selectYears-method gets a subset of an RD1 object

The selectRegion-method gets a subset of an RD1 object

The readRegDeath-method reads all information from 'GENESIS-Tabelle: 12613-02-02-4'

Usage

## S4 method for signature 'RD1'
header(object)

## S4 method for signature 'RD1'
footer(object)

## S4 method for signature 'RD1'
rd1(object)

## S4 method for signature 'RD1'
rd1total(object)

## S4 method for signature 'RD1'
content(object)

## S4 method for signature 'RD1'
region(object)

## S4 method for signature 'RD1'
protocol(object)

RegDeath1(header, footer, rd1, rd1total, content, region, protocol)

## S4 method for signature 'RD1'
length(x)

## S4 method for signature 'RD1'
show(object)

## S4 method for signature 'RD1'
selectYears(object, selectYears)

## S4 method for signature 'RD1'
selectRegion(object, selectRegion)

readRegDeath(infile)

Arguments

object

RD1-object

header

vector

footer

vector

rd1

data.table

rd1total

data.table

content

character

region

character

protocol

character

x

RD1-object

selectYears

vector

selectRegion

vector

infile

character file name

Details

This RD1 class fits to the GENESIS table 12613-02-02-4. See https://www.regionalstatistik.de/genesis/online for data details. An RD1 instance stores the raw header, the raw footer, the content, the version protocol and regional information and the death count information as a data.table object. Further it stores a second data.table with the total sums information. Try demo(RD1) for a demonstration.

Value

The header-method returns the raw header information

The footer-method returns the raw footer information

The rd1-method returns the death count table

The rd1total-method returns the death count total sums table

The content-method returns the content information

The region-method returns the regional information

The protocol-method returns the protocol information

The RegDeath1-constructor returns an RD1 object

The length-method returns the number of rows

The selectYears-method returns an RD1 object

The selectRegion-method returns an RD1 object

The readRegDeath-method returns an RD1 object

Slots

content

describes the content

region

regional entity

header

includes the raw header information

footer

includes the raw footer information

rd1

stores the death count table (data.table)

rd1total

stores the death count total sums table (data.table)

protocol

contains the protocol information

Examples

d1 <- readRegDeath(file.path(system.file(package="eoR"), "extdata", "12613-02-02-4m.csv"))
header(d1)
footer(d1)
rd1(d1)[, table(Year)]

RE1 class for 'GENESIS-Tabelle: 12411-03-03-4'

Description

The class RE1 stores GENESIS table information in a systematic way.

The header-method gets the raw header information of an RE1 object

The footer-method gets the raw footer information of an RE1 object

The re1-method gets the exposure table information of an RE1 object

The re1total-method gets the exposure total sums table information of an RE1 object

The content-method gets the exposure table information of an RE1 object

The region-method gets the regional information of an RE1 object

The protocol-method gets the protocol information of an RE1 object

The RegExp1-constructor creates an RE1 object

The length-method gets the number of rows int the RE1 re1 data.table

The selectYears-method gets a subset of an RE1 object

The selectRegion-method gets a subset of an RE1 object

The readRegExp-method reads all information from 'GENESIS-Tabelle: 12411-03-03-4'

Usage

## S4 method for signature 'RE1'
header(object)

## S4 method for signature 'RE1'
footer(object)

## S4 method for signature 'RE1'
re1(object)

## S4 method for signature 'RE1'
re1total(object)

## S4 method for signature 'RE1'
content(object)

## S4 method for signature 'RE1'
region(object)

## S4 method for signature 'RE1'
protocol(object)

RegExp1(header, footer, re1, re1total, content, region, protocol)

## S4 method for signature 'RE1'
length(x)

## S4 method for signature 'RE1'
show(object)

## S4 method for signature 'RE1'
selectYears(object, selectYears)

## S4 method for signature 'RE1'
selectRegion(object, selectRegion)

readRegExp(infile)

Arguments

object

RE1-object

header

vector

footer

vector

re1

data.table

re1total

data.table

content

character

region

character

protocol

character

x

RE1-object

selectYears

vector

selectRegion

vector

infile

character file name

Details

This RE1 class fits to the GENESIS table 12411-03-03-4. See https://www.regionalstatistik.de/genesis/online for data details. An RE1 instance stores the raw header, the raw footer, the content, the version protocol and regional information and the exposure information as a data.table object. Further it stores a second data.table with the total sums information. Try demo(RE1) for a demonstration.

Value

The header-method returns the raw header information

The footer-method returns the raw footer information

The re1-method returns the exposure table

The re1total-method returns the exposure total sums table

The content-method returns the content information

The region-method returns the regional information

The protocol-method returns the protocol information

The RegExp1-constructor returns an RE1 object

The length-method returns the number of rows

The selectYears-method returns an RE1 object

The selectRegion-method returns an RE1 object

The readRegExp-method returns an RE1 object

Slots

content

describes the content

region

regional entity

header

includes the raw header information

footer

includes the raw footer information

re1

stores the exposure table (data.table)

re1total

stores the exposure total sums table (data.table)

protocol

contains the protocol information

Examples

r1 <- readRegExp(file.path(system.file(package="eoR"), "extdata", "12411-03-03-4m.csv"))
header(r1)
footer(r1)
re1(r1)[, table(Year)]