Learn R Programming

BETS (version 0.4.9)

saveStata: Export a time series to STATA

Description

Writes a time series to a .dta (STATA) file.

Usage

saveStata(code = NULL, data = NULL, file.name = "series")

Arguments

code

An integer. The unique identifier of the series within the BETS database.

data

A data.frame or a ts. Contains the data to be written. If data is supplied, the BETS database will not be searched.

file.name

A character. The name of the output file. The default is 'series.dta'.

Value

None

Examples

Run this code
# NOT RUN {
 #Exchange rate - Free - United States dollar (purchase)
 #us.brl <- get(3691)
 #requires(seasonal)
 #us.brl.seasonally_adjusted <- seas(us.brl)
 #saveStata(data = us.brl.seasonally_adjusted,file.name="us.brl.seasonally_adjusted")
 # Or
 #saveStata(code=3691,file.name="us.brl")

# }

Run the code above in your browser using DataLab