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
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.
a list of "methods"
Roberto Bertolusso and Marek Kimmel
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.