Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add example code
  • Loading branch information
walke committed Nov 7, 2019
1 parent d0e5eea commit 9f89547
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Expand Up @@ -2,14 +2,14 @@ Package: eoR
Type: Package
Title: Data Management Package (Exposure and Occurrence Data in R)
Version: 0.4.0
Date: 2019-11-06
Date: 2019-11-07
Authors@R: c(person("Rainer", "Walke", role = c("aut", "cre"),
email = "walke@demogr.mpg.de",
comment = c(ORCID = "0000-0002-4269-6531")))
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 bioconductor.org we strive to encapsulate data in easy
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
Expand Down
10 changes: 10 additions & 0 deletions R/GENESISClasses.R
Expand Up @@ -27,6 +27,11 @@ NULL
#' @slot rd1 stores the death count table (data.table)
#' @slot rd1total stores the death count total sums table (data.table)
#' @slot 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)]
#' @export
#' @rdname RD1-class
setClass("RD1",
Expand Down Expand Up @@ -218,6 +223,11 @@ setValidity("RD1",
#' @slot re1 stores the exposure table (data.table)
#' @slot re1total stores the exposure total sums table (data.table)
#' @slot 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)]
#' @export
#' @rdname RE1-class
setClass("RE1",
Expand Down
8 changes: 8 additions & 0 deletions R/HMDClasses.R
Expand Up @@ -26,6 +26,10 @@ NULL
#' @slot header includes the raw header information
#' @slot lt1 stores the life table (data.table)
#' @slot 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)]
#' @export
#' @rdname LT1-class
setClass("LT1",
Expand Down Expand Up @@ -185,6 +189,10 @@ setValidity("LT1",
#' @slot header includes the raw header information
#' @slot ex1 stores the exposure table (data.table)
#' @slot 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)]
#' @export
#' @rdname EX1-class
setClass("EX1",
Expand Down
5 changes: 5 additions & 0 deletions man/EX1-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/LT1-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/RD1-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/RE1-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f89547

Please sign in to comment.