R implementation of FlexCode (Flexible Conditional Density Estimator via Regression)
See Izbicki, Rafael, and Ann B. Lee. "Converting high-dimensional regression to high-dimensional conditional density estimation." Electronic Journal of Statistics 11.2 (2017): 2800-2831. for additional details.