How to create List in Rcpp? 3 Ways! 1. Create the List directly and define the components List res; res["beta1_scr"] = beta1_scr; res["beta2_scr"] = beta2_scr; res["beta1_inf"] = beta1_inf; res["beta2_inf"] = beta2_inf; res["r_scr"] = r_scr; res["r_inf"] = r_inf; res["beta1_r_inf"] =beta1_r_inf; res["beta2_r_inf"] =beta2_r_inf; return(res); 2. Create the List and its components altogether 2.1 Without renaming return(List::create(hit_table, hit_count, hit_utility,hit_t_table, hit_t_count, hit_t_utility,ARL_rho,ARL_rho_index,ARL_rho_t,ARL_rho_t_index)); 2.2 With renaming return(List::create(Named("hit_table")=hit_table, _["hit_count"]=hit_count, _["hit_utility"]=hit_utility));