Skip to content
Prev 38768 / 63424 Next

key-value mapping in C inside R?

On Dec 30, 2010, at 11:25 AM, Matteo Bertini wrote:

            
Sure, assignment:
void defineVar(SEXP symbol, SEXP value, SEXP rho)
retrieval:
SEXP findVarInFrame(SEXP rho, SEXP symbol)

so the above assignment would be in C
defineVar(install("foo"), mkString("bar"), env)
where env is the environment created above.

Cheers,
Simon