search for: findvarinframe

Displaying 5 results from an estimated 5 matches for "findvarinframe".

Did you mean: findvarinframe3
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
...ast of length size. + * Depending on the do_Rcov_start params nb_lines and growth_rate, + * it will allocate an actual size of either nb_lines or size * growth_rate + */ +static SEXP cov_new_lines_vector(int size) { + SEXP sexp, lines; + int nb_lines, i; + int *tab; + double growth_rate; + + sexp = findVarInFrame(R_Cov_freqs_hash, install(".nb_lines")); + nb_lines = INTEGER(sexp)[0]; + if (size > nb_lines) { + sexp = findVarInFrame(R_Cov_freqs_hash, install(".growth_rate")); + growth_rate = REAL(sexp)[0]; + size = (int)(size * growth_rate); + } else { + size = nb_lines; + } + + PR...
2010 Jan 14
1
how to call a function from C
...t; class to encapsulate functions (they cover all three kinds, but this may change). To call the function, what we do is generate a call with the function as the first node and then evaluate the call. SEXP stats = PROTECT( R_FindNamespace( mkString( "stats") ) ); SEXP rnorm = PROTECT( findVarInFrame( stats, install( "rnorm") ) ) ; SEXP call = PROTECT( LCONS( rnorm, CONS( ScalarInteger(10), CONS(ScalarReal(0), R_NilValue ) ) ) ); SEXP res = PROTECT( eval( call , R_GlobalEnv ) ); UNPROTECT(4) ; return res ; It works, but I was wondering if there was another way. I've seen applyC...
2009 Jan 05
1
can't get names of R_env
Hi, I'm quite knew in R, so I might not have the R specific jargon. But here is my problem, I'm trying to access and use variabels given by a function environment, more specifically the rho in do_optim in src/main/optim.c According to the documentation http://cran.r-project.org/doc/manuals/R-ints.html#The-_0027data_0027 the envsxp is defined as a tagged pairlist. "ENVSXP: Pointers
1999 Mar 10
3
re: smp in Linux
A question to all you R-gurus: Can R (or S-plus, for that matter) make efficient use of multiple Intel Processors running under Linux (within the same PC, not over a net)? With the release of the new 2.2 kernel, this would seem a interesting and cost-efficient way of boosting the computational power of Intel/Linux platforms when using R (or S-plus). Thanks for any wise words, Kenneth
1999 Mar 10
3
re: smp in Linux
A question to all you R-gurus: Can R (or S-plus, for that matter) make efficient use of multiple Intel Processors running under Linux (within the same PC, not over a net)? With the release of the new 2.2 kernel, this would seem a interesting and cost-efficient way of boosting the computational power of Intel/Linux platforms when using R (or S-plus). Thanks for any wise words, Kenneth