search for: rinternals

Displaying 20 results from an estimated 325 matches for "rinternals".

Did you mean: internals
2002 Nov 09
1
Calling function with proto in Rinternals.h
(Tried this query on r-help with no luck, maybe someone here can help?) I would like to call the 'RFinalizerEx' function that appears in Rinternals.h using ".Call". It worked for me in the past, but now I get an error message something like: 'call function name not in call table'. I'm using the 1.6.1 rpm from CRAN. Anyone know what's going on? Thanks. Tim -- Timothy H. Keitt The University of Texas at Austin Secti...
2006 Feb 08
1
Rf_protect in Rinternals.h
Hello! I'd like to ask you a question about c (macros): In Rinternals.h are defined: a) SEXP Rf_protect(SEXP); b) #define protect Rf_protect c) #define PROTECT(s) protect(s) As far as I understand the calls Rf_protect( x ), protect( x ) and PROTECT( x ) are all equalent. So whats the reason that there are 2 macros defined? Why 3 times the same when 1 distinct...
2011 Aug 13
1
Latent flaw in SEXPREC definition
There seems to be a latent flaw in the definition of struct SEXPREC in Rinternals.h, which likely doesn't cause problems now, but could if the relative sizes of data types changes. The SEXPREC structure contains a union that includes a primsxp, symsxp, etc, but not a vecsxp. However, in allocVector in memory.c, zero-length vectors are allocated using allocSExpNonCons, whic...
2005 Jan 30
2
Rinternals.h and iostream don't play nice together'
Hi, Consider the following file. ******************************* foo.cc ******************************* #include <R.h> #include <Rinternals.h> #include <iostream> ******************************* R CMD SHLIB foo.cc gives scads of errors. I've use C++ extensively with R before (using C linkage) but not with Rinternals.h. I'm puzzled. The errors make no sense to me. Am I doing something wrong? Is it impossible to use...
2004 Feb 11
1
About the macro defined in Rinternals.h
Hello everyone, I try to write a c++ code which calls embedded R and uses some of R internal functions. What I read is just lots of macro names defined in the Rinternals.h or Rdefines like R_Parse, Rf_install and so on. But where can I get the detailed information about the parameters of these macro? For example, what about the parameters of SEXP R_ParseVector(SEXP, int, ParseStatus *)? Thank you very much! Baiyi Song Computer Engineering Institute Dortmund...
2014 Aug 22
1
what are labels in struct sxpinfo_struct from Rinternals.h mean?
Dear Rdevelers, ? ? ?The following struct is in the Rinternals.h. I want to know ?the meanings of labels or names like "gp,mark,obj,named,trace....." . TKS! struct sxpinfo_struct { ? ? SEXPTYPE type ? ? ?: ?5;/* ==> (FUNSXP == 99) %% 2^5 == 3 == CLOSXP ? ? * -> warning: `type' is narrower than values ? ? * ? ? ? ? ? ? ?of its type...
2020 Oct 19
2
Is there any way to check the class of an ALTREP?
Hi all, I would like to determine if an ALTREP object is from my package, I see there is a function `ALTREP_CLASS` defined in RInternal.h but its return value is neither a `R_altrep_class_t` object nor an STRSXP representing a class name. I do not know how to correctly use it. Any suggestions? Thanks, Jiefei [[alternative HTML version deleted]]
2007 Apr 06
2
wishlist: additional argument in R_tryEval (Rinternals.h)
Hi, R_tryEval, exported in Rinternals.h but not part of the API, is currently defined as: R_tryEval(SEXP e, SEXP env, int *ErrorOccurred); I'm trying to embed R in an application (basically yet another GUI), and this has been very helpful to catch errors. It would be even more helpful if it also gave access to the visibility flag...
2020 Oct 19
2
Is there any way to check the class of an ALTREP?
...package: https://github.com/Jiefei-Wang/SharedObject/blob/804b6ac58c63a4bae95343ab43e8b1547b07ee6b/src/C_interface.cpp#L185 > > and in base R: https://github.com/wch/r-source/blob/54fbdca9d3fc63437d9e697f442d32732fb4f443/src/include/Rinlinedfuns.h#L118 > > The macro is defined here in Rinternals.h: > https://github.com/wch/r-source/blob/abb550c99b3927e5fc03d12f1a8e7593fddc04d2/src/include/Rinternals.h#L325 > > Den man. 19. okt. 2020 kl. 10.13 skrev Jiefei Wang <szwjf08 at gmail.com>: >> >> Hi all, >> >> I would like to determine if an ALTREP object i...
2005 May 18
2
R Include File Guards
...lt;R_ext/bar.h> #ifndef R_EXT_BAR_H Missing guards: <IOStuff.h> <Internal.h> <Parse.h> <R_ext/GraphicsBase.h> <R_ext/GraphicsDevice.h> <R_ext/GraphicsEngine.h> <R_ext/R-ftp-http.h> <R_ext/libextern.h> Illegal Guards (leading underscore): <Rinternals.h> <R_ext/Error.h> <config.h.in> ---------------------------------------------------------- SIGSIG -- signature too long (core dumped)
2007 Mar 19
3
Rinternals.h and undefined symbols
...gisterRoutinesP8_DllInfoPK12R_CMethodDefPK15R_CallMethodDefS3_S6 _ Why does it have this funny name? If I look at libR.so, I get an ordinary symbol name: $ nm ~/lib64/R/lib/libR.so | grep R_registerRoutines 0000000000032f80 T R_registerRoutines I get normal symbol names for R functions not in Rinternals.h and there is no problem there. For example: nm bgx.Rcheck/bgx/libs/bgx.so | grep Rprintf U Rprintf $ nm ~/lib64/R/lib/libR.so | grep Rprintf 0000000000129690 T Rprintf The shared library dependencies are also fine: $ ldd bgx.Rcheck/bgx/libs/bgx.so libR.so => /...
2002 Feb 25
1
Interfacing pre-existing C++ library from R
...I've managed to to most of what I want, but I have one remaining question and a suggestion. The suggestion first: I've found it useful to put #ifdef __cplusplus extern "C" { #endif and #ifdef __cplusplus } #endif around the function prototypes in Rinternals.h (in /usr/local/lib/R/include on my Red Hat 7.2 box) so my dynamic linker would no longer complain about mangling-related undefined symbols. Also, I had to use #define USE_RINTERNALS before including them in order to get a few macros I suppose are natural to use. To be honest, I do think the inclu...
2002 Jul 02
3
interfacing R and c++
...I'm trying to write a gui program that accesses some R code I've written. The gui is written in c++ and includes qt libraries and vigra libraries (for image manipulation). Unfortunately I've been getting dependencies due to constants getting redefined within the R.h/R_ext library and Rinternals.h. I tried rewriting the R interface but the problem keeps propagating. I've been told Gnumeric is a better gui library for working with R however, before I rewrite my entire program, is there an obvious solution to calling R functions in C++/qt? Thanks. Nancy ------------------------------...
2002 Jul 02
3
interfacing R and c++
...I'm trying to write a gui program that accesses some R code I've written. The gui is written in c++ and includes qt libraries and vigra libraries (for image manipulation). Unfortunately I've been getting dependencies due to constants getting redefined within the R.h/R_ext library and Rinternals.h. I tried rewriting the R interface but the problem keeps propagating. I've been told Gnumeric is a better gui library for working with R however, before I rewrite my entire program, is there an obvious solution to calling R functions in C++/qt? Thanks. Nancy ------------------------------...
2020 Oct 19
1
Is there any way to check the class of an ALTREP?
...redObject/blob/804b6ac58c63a4bae95343ab43e8b1547b07ee6b/src/C_interface.cpp#L185 > > > > > > and in base R: > https://github.com/wch/r-source/blob/54fbdca9d3fc63437d9e697f442d32732fb4f443/src/include/Rinlinedfuns.h#L118 > > > > > > The macro is defined here in Rinternals.h: > > > > https://github.com/wch/r-source/blob/abb550c99b3927e5fc03d12f1a8e7593fddc04d2/src/include/Rinternals.h#L325 > > > > > > Den man. 19. okt. 2020 kl. 10.13 skrev Jiefei Wang <szwjf08 at gmail.com > >: > > >> > > >> Hi all, >...
2006 Apr 12
0
headerfile translation to Delphi (Pascal) completed
...--------------------------------------- Convolve -------- The first demo presents the convolve examples from the manual "Writing R Extensions" in a "Delphi-translated" version. The three interface functions .C, .Call and .External are used and the application of some macros in Rinternals.h and Rdefines.h (which become rhRInternal.pas and rhRDefines.pas) is shown. RegisteredConvolve ------------------ "RegisteredDemoEx.dll" shows how to register a Delphi function in the "R_init_<dll-name>" call. [The RegisteredConvDemo was the first attempt but the freel...
2008 Mar 15
1
Experimental R_has_slot() utility
...h. $ svn up At revision 44759. $ grep -i has_slot `find include -name '*.h'` $ grep -i _slot `find include -name '*.h'` include/Rdefines.h:#define GET_SLOT(x, what) R_do_slot(x, what) include/Rdefines.h:#define SET_SLOT(x, what, value) R_do_slot_assign(x, what, value) include/Rinternals.h:SEXP R_do_slot(SEXP obj, SEXP name); include/Rinternals.h:SEXP R_do_slot_assign(SEXP obj, SEXP name, SEXP value); ..or did I miss it ? Thanks, L.
2005 Mar 16
1
function-like macros undefined
Hi, Somehow function-like macros from Rinternals.h are not defined when I include the file. foo.c ################## #include <R.h> #include <Rinternals.h> #ifndef NILSXP #error("NILSXP") #endif #ifndef INTEGER #error("INTEGER") #endif ################### When compiled: vor/src% gcc -I/usr/local/lib/R/in...
2009 Feb 20
1
C function calling in R
Dear all, I have a problem in calling my C code from R. If I do not need to use #include<R.h>, the codes work properly. But when I need to use it, my codes produce an error as: logpostCLM.cpp:7:15: error: R.h: No such file or directory logpostCLM.cpp:8:24: error: Rinternals.h: No such file or directory logpostCLM.cpp:9:19: error: Rmath.h: No such file or directory logpostCLM.cpp:10:24: error: R_ext/BLAS.h: No such file or directory My computer is an HP using Window Vista. My code in codeblocks starts as below: typedef double *vector; extern "C"{ #include...
2007 Jun 04
2
missing IntegerFromString()
I have created a DLL not so long ago using C code. My code used the IntegerFromString() function that used to be exported in the Rinternals.h header file (and thus easily accessible). Recently I upgraded to R 2.5.0 and my DLL stopped working. I see that the IntegerFromString() function is not exported in any of the header files in the RHOME\include directory. Is it possible for me to use it without installing all R source files? I can...