Re: [R-pkg-devel] run a function from a list

2017-05-28 Thread Richard M. Heiberger
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

Re: [R-pkg-devel] run a function from a list

2017-05-27 Thread Iñaki Úcar
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