Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Schedule Function #19

Closed
sarangvrao opened this issue Oct 29, 2015 · 1 comment
Closed

Problem with Schedule Function #19

sarangvrao opened this issue Oct 29, 2015 · 1 comment

Comments

@sarangvrao
Copy link

@sarangvrao sarangvrao commented Oct 29, 2015

Hi, There seems to be a problem with the Schedule function. It not looking up "Monthly" value.

the matchFrequency lookup function is missing the value "Monthly" in function variables.Bond.R

line 568-583. code below:

matchFrequency <- function(freq = c("NoFrequency","Once", "Annual",
                                    "Semiannual", "EveryFourthMonth",
                                    "Quarterly", "Bimonthly",
                                    "EveryFourthWeek", "Biweekly",
                                    "Weekly", "Daily")){
    if (!is.numeric(freq)){
       freq <- match.arg(freq)
       freq <- switch(freq,
                      NoFrequency = -1, Once = 0, Annual = 1,
                      Semiannual = 2, EveryFourthMonth = 3,
                      Quarterly = 4, Bimonthly = 6,
                      Monthly = 12, EveryFourthWeek = 13,
                      Biweekly = 26, Weekly = 52, Daily = 365)
    }
    freq
}
@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Oct 29, 2015

Yes, looks like a bug in the function argument.

eddelbuettel added a commit that referenced this issue Oct 30, 2015
add Monthly to freq arguments in matchFrequency (closes #19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.