[R] RQuantLib: SET_VECTOR_ELT() can only be applied to a 'list', not a 'symbol'
Cren
oscar.soppelsa at bancaakros.it
Wed Aug 8 09:54:49 CEST 2012
# Hi all,
# trying to run the following example code
# from 'RQuantLib' package...
HullWhite <- list(term = 0.055, alpha = 0.03, sigma = 0.01,
gridIntervals = 40)
Price <- rep(as.double(100),24)
Type <- rep(as.character("C"), 24)
Date <- seq(as.Date("2006-09-15"), by = '3 months', length = 24)
callSch <- data.frame(Price, Type, Date)
callSch$Type <- as.character(callSch$Type)
bondparams <- list(faceAmount=100, issueDate = as.Date("2004-09-16"),
maturityDate=as.Date("2012-09-16"), redemption=100,
callSch = callSch)
dateparams <- list(settlementDays=3, calendar="us",
dayCounter = "ActualActual",
period="Quarterly",
businessDayConvention = "Unadjusted",
terminationDateConvention= "Unadjusted")
coupon <- c(0.0465)
CallableBond(bondparams, HullWhite, coupon, dateparams)
# ...I get the following error:
# ---> SET_VECTOR_ELT() can only be applied to a 'list', not a 'symbol'
<---
# Wandering through Internet, I found something similar to my
# issue which has been solved by updating packages.
# I tried the same but no results :(
# Two weeks ago the same code worked properly.
# Any idea about what changed in the meantime?
# Thanks :)
--
View this message in context: http://r.789695.n4.nabble.com/RQuantLib-SET-VECTOR-ELT-can-only-be-applied-to-a-list-not-a-symbol-tp4639542.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list