as.df-methods: 'EventSeries'-to-data.frame method

as.data.frame.EventSeriesR Documentation

EventSeries-to-data.frame method

Description

Convert an EventSeries to an R-data.frame

Usage

as.data.frame.EventSeries(x)

Arguments

x

An object of class EventSeries

Details

This method extracts all events in an EventSeries, sends each event's EventDate, EventType, EventValue, and state variables from the java-object to R (through rJava) and structures the data in an R-data.frame object.

Value

An R-data.frame containing a structured representation of the events in the function argument

See Also

ContractType, generateEvents, processEvents

Examples

pam = Pam()
set(pam, what=list(
                   ContractID = "001",
                   Currency = "CHF",
                   ContractRole = "RPA",
                   StatusDate       = "2012-12-31T00",
                   ContractDealDate = "2012-12-31T00",
                   InitialExchangeDate = "2013-01-01T00",
                   MaturityDate = "2013-03-31T00",
                   NotionalPrincipal = 1000, 
                   NominalInterestRate = 0.01,
                   DayCountConvention = "30E/360"))
ad = AD0("2012-12-31T24")
evs = events(pam, ad)
class(evs)

evs.df = as.data.frame(evs)
class(evs.df)


wbreymann/FEMS documentation built on May 6, 2024, 2:19 p.m.