Hi,
This is easy if the gender and age are already vectors of some sort of the same
size.
SEXP df = PROTECT(allocVector(VECSXP, 2));
SET_VECTOR_ELT(df,0,gender) ;
SET_VECTOR_ELT(df,1,age) ;
SEXP names = PROTECT(allocVector(STRSXP,2));
SET_STRING_ELT(names,0,mkChar("age"))
SET_STRING_ELT(names
Hi ,
I am asking too many questions , sorry for that . I am creating a data
frame in C itself , reading a table .
The data frame calling code looks like this
==
*PROTECT(dfm=lang2(install("data.frame"),df));*
*SEXP res = PROTECT(eval(dfm,R_GlobalEnv));*
UNPR