XBRL: "Mutable state" function that exposes "methods" that analyze...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/XBRL.R

Description

XBRL is a "mutable state" function that offers a object-oriented programming-like interface, by exposing "methods" that perform accions on XBRL files. It keeps a list of data frames that are populated by the "methods" by calls to the low-level functions (see xbrlParse).

The approach used is derived from an example included in *10.7 Scope* of *An Introduction to R*. The employed terminology may be inaccurate, hence the quotations. XBRL "methods" are called by xbrlDoAll. See examples of use below.

Usage

1
XBRL()

Arguments

no arguments

Value

a list of "methods"

Author(s)

Roberto Bertolusso and Marek Kimmel

See Also

xbrlDoAll, xbrlParse

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
## Setting stringsAsFactors = FALSE is highly recommended
## to avoid data frames to create factors from character vectors.
options(stringsAsFactors = FALSE)

## XBRL instance file to be analyzed, accessed
## directly from SEC website:
inst <- "https://www.sec.gov/Archives/edgar/data/21344/000002134413000050/ko-20130927.xml"

xbrl <- XBRL()
xbrl$setCacheDir("XBRLcache")
xbrl$openInstance(inst)
## Perform a discovery of the taxonomy:
xbrl$processSchema(xbrl$getSchemaName())
## Process instance file:
xbrl$processContexts()
xbrl$processUnits()
xbrl$processFacts()
xbrl$processFootnotes()
xbrl$closeInstance()
xbrl.vars <- xbrl$getResults()

## End(Not run)

XBRL documentation built on May 1, 2019, 8:46 p.m.