Displaying 20 results from an estimated 200 matches similar to: "Rinternals.h and undefined symbols"
2007 Apr 25
2
R-2.5.0 and unlink/wildcards
It seems unlink doesn't work with wildcards in 2.5.0. I've tried
R-2.5.0 under gnu/linux from source and the Mac binary from att
research. Example:
> dir()
[1] "bgx.Rnw" "bgx.pdf" "run.1"
> unlink("run.*",recursive=T)
> dir()
[1] "bgx.Rnw" "bgx.pdf" "run.1"
> unlink("run.1",recursive=T)
2007 May 01
1
Embedding R and registering routines
Hello,
The use of .Call and the like all depend on loading shared libraries and
registering routines from it. Also, .Primitive and .Internal depend on
routines being registered in the R binary. And applications that embed R
can override routines declared in Rinterfac.h, but is there a way for an
application embedding R to register other routines defined in the
application without loading a
2003 Dec 09
1
R Interface handholding
Hello,
I need a bit of handholding with R, specifically, with writing
packages for it. I'm a systems programmer, and am, on the request
of several users of our software, working on generating R interfaces.
For starters, I've written the following R function (which compiles):
SEXP myincr(SEXP Rinput)
{ // Returns input integer incremented by one
int input;
SEXP returner;
PROTECT(Rinput =
2009 Jan 08
1
Callbacks seems to get GCed.
Dear list,
I am trying to implement a publish-subscribe mechanism in for an embedded
R interpreter. But somehow my registered closures seem to get collected by
the GC, even though I have protected them. I have reducted my code to the
following sample. Sorry if it is a little verbose.
The first couple of call of calls still work, but at some point one of the
callbacks (callback1 in my
2012 Feb 06
1
Segfault on ".C" registration via R_CMethodDef according to 'Writing R Extensions'.
Dear R List,
I encountered a serious problem regarding the registration of ".C" when following the documentation "Writing R Extensions"
that leads to a segmentation fault (tested on windows and mac os x).
The registration mechanism for ".C" routines via R_registerRoutines and
the R_CMethodDef structure has been enhanced recently with the
addition of two fields, one
2018 Feb 23
2
Problem with R_registerRoutines
Thanks a lot for your answer Jeroen!
I should have mentioned that I had actually only checked with the win-builder, as I did not have R-devel installed on my computer.
But based on your answer I installed R-devel locally on a Linux-server (Redhat), and the package could be checked without the NOTE. So you might be right that this is a windows issue. However, another package that I am maintaining
2018 Feb 23
2
Problem with R_registerRoutines
Dear list,
I am trying to update a package to pass the CRAN-checks.
But I am struggling with the following note:
File 'psgp/libs/i386/psgp.dll':
Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
File 'psgp/libs/x64/psgp.dll':
Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
It is good practice to register native
2008 Jul 30
2
R, Macports and C++ streams
Dear all,
R on Macports relies on GCC 4.3 to build packages. I find that
packages with shared objects that use C++ streams crash R if they're
compiled using Macports' gcc43, but work fine if compiled in exactly
the same way using Apple-supplied GCC 4.2. Has anyone here had the
same issue/know what is causing this problem?
Thanks,
Ernest
2007 Apr 26
2
path autocompletion in 2.5.0
Hi,
R 2.5.0 isn't auto-completing paths properly as it used to. E.g.
suppose I have:
> dir("CEL/choe")
[1] "chipC-rep1.CEL" "chipC-rep2.CEL" "chipC-rep3.CEL" "chipS-rep1.CEL"
[5] "chipS-rep2.CEL" "chipS-rep3.CEL"
Now if I do:
ReadAffy("CEL/choe/ch<tab> # => ReadAffy("CEL/choe/chip
2010 Feb 03
1
ctrl-C aborts R when compiling package code with ICC+openMP
Hi all,
I have some C++ code that I call from my package. In my main C++ loop, I check for user interrupts and return to the R shell after ensuring I've deallocated memory appropriately. This works fine when the code is compiled with gcc+openmp and with icc without openmp, but when I compile with icc and use openmp, the entire R session is immediately terminated when I hit ctrl-C. This
2007 Feb 25
3
R/C++/memory leaks
Dear all,
I have wrapped a C++ function in an R package. I allocate/deallocate
memory using C++ 'new' and 'delete'. In order to allow user
interrupts without memory leaks I've moved all the delete statements
required after an interrupt to a separate C++ function freeMemory(),
which is called using on.exit() just before the .C() call.
I am concerned about the
2007 Mar 20
2
PKG_CFLAGS/CFLAGS and PKG_CXXFLAGS/CXXFLAGS
Why is it that R places CFLAGS after PKG_CFLAGS and not before when
compiling a package (e.g. through R CMD build pkg)? This can be
problematic if, for instance, you want to use -O3, but -O2 is in
R_HOME/etc/Makeconf. If -O2 (in CFLAGS) appears after -O3 (in
PKG_CFLAGS), you are left with what you didn't want: -O2.
In R-exts, it says that "Flags which are set in file etc/Makeconf
2013 Mar 09
5
question on why Rigroup package moved to Archive on CRAN
Hi,
Who should I ask about my package Rigroup_0.83 being moved to Archive status on CRAN and no longer available via install.package? I have no problems with the move if this was simply because of low demand. However, if there was a build issue with the newest releases that caused problems, I would be happy to address it. I'll just ask my students to install it from my own locally hosted
2007 Jan 23
2
is it necessary to always register C routines with R_registerRoutines?
I am writing bindings to the neural network simulator SNNS.
At present I have used only .C interface, now I'm studying .Call interface.
I have adapted the example from page 77 of r-exts.pdf, however, it crashes
R.
I use MingW as recommended by Duncan Murdoch.
Please, tell me what I am missing.
The code is below.
Thank you.
SEXP snns_getVersion(void)
{SEXP version;
char *v;
2005 Dec 28
2
.Call not counting parameters consistently (PR#8450)
The R_registerRoutines C function allows the number of parameters to a
.Call function to be registered. For example, the tools package
function md5sum() calls "Rmd5", which has been registered to require
just one parameter.
But if it is called with the wrong number of parameters, only the first
error gets caught:
> library(tools)
>
2024 May 28
1
How to call directly "dotTcl" C-function of the tcltk-package from the C-code of an external package?
I have a use case with tcltk-package where I need to repeatedly call Tcl/Tk functions
very quickly. For such purpose, the standard R-interface turned out to be too slow, and
better option has been to call package's C-function dotTcl directly from my own C-code.
Before R 4.4.0 it was possible to use getNativeSymbolInfo("dotTcl","tcltk")$address (or
2007 Mar 19
1
Carriage returns and Sweave output
Dear all,
I have a code chunk in my Rnw file that, when executed, outputs
carriage return characters ('\r') to inform on the progress (e.g.
"sweep 4 of 1024\r"). But Sweave interprets this as a newline
character, and therefore I get countless pages of output in my
vignette where I only really want one line. Any ideas?
Thanks
E
2007 May 14
1
file separator inconsistencies on windows?
tempdir() on windows returns the path using "\\" as file separator.
But .Platform$file.sep returns "/". As a result, you get
inconsistencies like:
> file.path(tempdir(), "foo")
[1] "C:\\WINDOWS\\Temp\\RtmpYEIXrb/foo" # Mix of \\ and /
I'm not sure if this can cause problems but I thought I'd let you
know just in case.
2005 Oct 29
1
dyn.load() error: bad external relocation length
R-helpers,
Is there an easy way to call an external (C) program using .C or .Call
without including the code in a package. I know how to do it using
system(), but that doesn't seem to be a permanent or portable solution.
Initially I tried:
.Call('filepath.to.c.function', arg1)
and got this error:
Error in .Call("filepath.to.c.function", "arg1", :
2004 Aug 18
3
R as shared library
Hello folks,
I'm embarking on a project to embed R into the Apache web server, and
I'd like your help. Currently, I'm looking for a way for R code to call
back into a shared library from which the R shared library was loaded.
Essentially, apache starts and loads mod_R.so which runs an
initialization routine which calls Rf_initEmbeddedR() and the following
code:
/* override to