Skip to content

Commit

Permalink
use the package as a package, need to install first
Browse files Browse the repository at this point in the history
  • Loading branch information
walke committed Sep 20, 2019
1 parent f30ca61 commit 8756512
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
exportPattern("^[[:alpha:]]+")

import("data.table")
22 changes: 12 additions & 10 deletions tests/Simple1.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Rainer Walke, MPIDR Rostock

source(file.path("..","R","eo1.R"))
library(data.table)
library(eoR)


####

Expand All @@ -9,7 +11,7 @@ source(file.path("..","R","eo1.R"))
# read all information from the file fltper_1x1
# example data source: Human Mortality Database https://www.mortality.org/
# period life tables 1x1 female
infile <- file.path("..","inst","extdata","DEUTNP.fltper_1x1.txt")
infile <- file.path(system.file(package="eoR"), "extdata", "DEUTNP.fltper_1x1.txt")

o1 <- readLT1x1(infile)

Expand Down Expand Up @@ -46,7 +48,7 @@ showMethods("length")
# read all information from the file Exposures_1x1
# example data source: Human Mortality Database https://www.mortality.org/
# period life tables 1x1 female
infile2 <- file.path("..","inst","extdata","DEUTNP.Exposures_1x1.txt")
infile2 <- file.path(system.file(package="eoR"), "extdata", "DEUTNP.Exposures_1x1.txt")

e1 <- readEX1x1(infile2)

Expand Down Expand Up @@ -79,10 +81,10 @@ showClass("EX1")
showMethods("length")

# read all information from 'GENESIS-Tabelle: 12613-02-02-4'
# Statistische ?mter des Bundes und der L?nder, Deutschland, 2019
# Gestorbene nach Geschlecht, Nationalit?t und Altersgruppen -
# Jahressumme - regionale Tiefe: Kreise und krfr. St?dte
infile3 <- file.path("..","inst","extdata","12613-02-02-4.csv")
# Statistische Ämter des Bundes und der Länder, Deutschland, 2019
# Gestorbene nach Geschlecht, Nationalität und Altersgruppen -
# Jahressumme - regionale Tiefe: Kreise und krfr. Städte
infile3 <- file.path(system.file(package="eoR"), "extdata", "12613-02-02-4.csv")

d1 <- readRegDeath(infile3)

Expand Down Expand Up @@ -126,9 +128,9 @@ showMethods("length")


# read all information from 'GENESIS-Tabelle: 12411-03-03-4'
# Statistische ?mter des Bundes und der L?nder, Deutschland, 2019
# Bev?lkerung nach Geschlecht, Nationalit?t und Altersgruppen
infile4 <- file.path("..","inst","extdata","12411-03-03-4.csv")
# Statistische Ämter des Bundes und der Länder, Deutschland, 2019
# Bevölkerung nach Geschlecht, Nationalität und Altersgruppen
infile4 <- file.path(system.file(package="eoR"), "extdata", "12411-03-03-4.csv")

r1 <- readRegExp(infile4)

Expand Down

0 comments on commit 8756512

Please sign in to comment.