R package cgam: Constrained Generalized Additive Model. A constrained generalized additive model is fitted by the cgam routine. Given a set of predictors with or without shape or order restrictions, the maximum likelihood estimator for the constrained generalized additive model is found using an iteratively re-weighted cone projection algorithm. The cone information criterion (CIC) may be used to select the best combination of variables and shapes. One extension of this package is isotonic regression in two dimensions using warped-plane splines without using additivity assumptions, which is implemented by the wps routine.