I followed this link
Passing a data frame from-to R and C using .call()
to find the way to access an R data frame inside C. My requirement is the opposite of that. I have a tabular data in C and need to create an R data frame object in C and return it on as SEXP.
For simple R vectors and lists creation, I followed something like in this link
http://adv-r.had.co.nz/C-interface.html
But I am still wondering how to create a dataframe and return from C to R. Considering a dataframe is a list, I tried creating a list and passing it on, but it expectedly gets me a list in R and not a dataframe.
Any help would be appreciated.