filter: Filter the Data with the Bond Type and Date

Description Usage Arguments Details Value

Description

Filter the data with the attribute of bond's type and important dates, this will help to customize the further work. It is the best practice to use this filter function to the data returned by getDataUsingWind. But if the data returned by uwSplit exists and such data is big, then use filter to it is better to avoid the long-time wait by using uwSplit.

Usage

1
2
3
filterType(data, type)

filterDate(data, start = NULL, end = NULL, date_type = "initdate")

Arguments

data

data.frame, it's better to be returned by getDataUsingWind however if the data has the column *type* it will work

type

character, used to choose which type of credit bond to be filtered, if the type is incorrect, the function will stop and give message

start

the start date, can be string like "2016-01-01"

end

the end date, can be string like "2016-01-01"

date_type

the date type used to filtered data, "initdate" or "carrydate"

Details

Pay attention to that when filtering the type, only three type options can be given and get the right result. When filtering date, start and end dates are all given and obtain the result, otherwise two params are default set to NULL which will just pass throught the input data.

Value

The filtered data.frame for the further work.


baixueyuan/pryrk documentation built on May 11, 2019, 5:26 p.m.