export_csv: Make a CSV file from measures in IOTs

Description Usage Arguments Details See Also Examples

View source: R/export_csv.R

Description

Function to extract measures from IOTs into a CSV file

Usage

1
export_csv(measures, iots, long = FALSE, filename = "choose")

Arguments

measures:

vector with the names of the measures

iots:

list of input-output tables for which measures are already calculated

long:

Whether data is in long or wide format.

filename:

Where to store the data

Details

filename = "choose" is default and will prompt a file-choose dialog.

First element in vector will be used to find the description of the data Make sure the output of the measures are of the same length. (i.e. all need to be on e.g. country-industry, country or industry level)

See Also

export_dataframe(): [export_dataframe()]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
iots <- load_iots("WIOD2013", 2000:2001)
iots <- oniots(wiod_gii, iots)

Not specifying directory prompts a file-choose dialog
export_csv("gii", iots)
export_csv("gii", iots, long = TRUE)

Save table in working directory
export_csv("gii", iots, filename = "myresults.csv")

Or specify a directory:
export_csv("gii", iots, filename = "D:/Research/myresults.csv")

## End(Not run)

sybrendeuzeman/WIOD_package documentation built on Jan. 29, 2020, 9:07 p.m.