Your quote symbols are certainly getting in the way.
try basing your next version on something like this,
where the items in the list named tmp are actual functions, not
character strings.
> tmp <- list(prob=pnorm, quantile=qnorm)
> tmp$prob(1.96)
[1] 0.9750021
> tmp$quantile(.975)
[1] 1.959964
Hi Glenn,
Try this:
my_list <- list(func = eval(parse(text=paste0("function()",
"print('this is a function')"
my_list$func()
#> "this is a function"
Regards,
Iñaki
2017-05-27 14:49 GMT+02:00 Glenn Schultz :
> All,
> I have a function to split a fixed rate bond into a floater/inverse floater
All,
I have a function to split a fixed rate bond into a floater/inverse floater
combination (something typically done in mortgage securtizations). The
function returns a list which serves as the deal structure over which principal
payment rules will iterate. However, I would like to call the