Description Usage Arguments Details Value See Also Examples
This provides a direct interface for reading a COIN Tool input deck and converting it to COINr. You need to provide a COIN Tool file, with the "Database" sheet properly compiled.
1 | COINToolIn(fname, makecodes = FALSE, oldtool = FALSE)
|
fname |
The file name and path to read, e.g. |
makecodes |
Logical: if |
oldtool |
Logical: if |
The COIN Tool is an Excel-based tool for building composite indicators.
See COINr online documentation for more details and an example.
A list containing:
.$IndData
A data frame of imported indicator data to be input as the IndData
argument in assemble()
.
.$IndMeta
A data frame of imported indicator metadata to be input as the IndMeta
argument in assemble()
.
.$AggMeta
A data frame of imported aggregation metadata to be input as the AggMeta
argument in assemble()
.
coin2Excel()
Export COIN contents to Excel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
## This example downloads a COIN Tool spreadsheet containing example data,
## saves it to a temporary directory, unzips, and reads into R. Finally it
## assembles it into a COIN.
# Make temp zip filename in temporary directory
tmpz <- tempfile(fileext = ".zip")
# Download an example COIN Tool file to temporary directory
# NOTE: the download.file() command may need its "method" option set to a
# specific value depending on the platform you run this on. You can also
# choose to download/unzip this file manually.
download.file("https://knowledge4policy.ec.europa.eu/sites/default/
files/coin_tool_v1_lite_exampledata.zip", tmpz)
# Unzip
CTpath <- unzip(tmpz, exdir = tempdir())
# Read COIN Tool into R
l <- COINToolIn(CTpath, makecodes = TRUE)
# We can finish by assembling it
CT_exampleCOIN <- assemble(l$IndData, l$IndMeta, l$AggMeta)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.