search for: jl_eval_string

Displaying 1 result from an estimated 1 matches for "jl_eval_string".

2014 Jun 24
2
using C code to create data frame but always return as list
...a_R_MD_NA_DataFrame(jl_value_t* Var) {  SEXP ans,names,rownames;  char evalcmd[4096];  int i;  const char* dfname="DataFrameName0tmp";  jl_set_global(jl_main_module, jl_symbol(dfname), (jl_value_t*)Var);  //Get Frame cols   sprintf(evalcmd,"size(%s,2)",dfname);  jl_value_t* cols=jl_eval_string(evalcmd);  int collen=jl_unbox_long(cols);  jl_value_t* eachcolvector;  //Create VECSXP  //Create SEXP for Each Column and assign  PROTECT(ans=allocVector(VECSXP,collen));  for (i=0;i<collen;i++)  {   sprintf(evalcmd,"%s[%d]",dfname,i+1);   eachcolvector=jl_eval_string(evalcmd);   SET...