R sample from mixture distribution

This is a noncentral chi-squared distribution with n degrees of freedom and non-centrality parameter lambda, so rchisq(N, df=n, ncp=lambda) should draw N samples from that distribution.