Generalized hypergeometric function in R

Just wrote an R function to calculate the generalized hypergeometric function \(pFq\) for real numbers. The function is evaluated based on the series expansion of Pochhammer symbol. The function also allows you to have vectorized input.

You can find the code at

The function depends on the Pochhammer function which is available at

Categorized as Default, R

By Feng Li

Dr. Feng Li is an Associate Professor of Statistics in the School of Statistics and Mathematics at Central University of Finance and Economics in Beijing, China. Feng obtained his Ph.D. degree in Statistics from Stockholm University, Sweden in 2013. His research interests include Bayesian computation, econometrics and forecasting, and distributed learning. His recent research output appeared in statistics and forecasting journals such as the International Journal of Forecasting and Statistical Analysis and Data Mining, AI journals such as Expert Systems with Applications, and medical journals such as BMJ Open.


      1. hi.. i wanna say thank you so much to you cause your blog really help me to finish my work. but i have a question, in the code there are any red syntax, is it failed code or not? because if we use matlab, the red syntax it’s mean that failed. please answer, thankyou!

Leave a comment

Your email address will not be published. Required fields are marked *