makeDim: Make dictionary dimensions

Description Usage Arguments Value Note References Examples

Description

Lookup basic time and geography dimensions. You can use it on your own dataset. Be aware you need to have date # Date type and country # character type columns in fact table DT.

Usage

1
makeDim(DT = NULL)

Arguments

DT

data.table a fact table.

Value

data.table fact table including time and/or geography dimension (depending on the input columns).

Note

Required fields date and country can be also data types which can be directly converted using as.character and as.Date. See references for geography dim key details.

References

http://dev.maxmind.com/geoip/legacy/codes/iso3166/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  # load shinyBI sample DT
  DT <- readRDS(system.file("extdata","cran_logs.rds",package="shinyBI"))
  DT <- makeDim(DT)
  shinyBI()

  # load dataset from csv
  DT <- fread("source.csv")
  DT <- makeDim(DT)
  shinyBI()

## End(Not run)

jangorecki/shinyBI documentation built on May 18, 2019, 12:25 p.m.