Displaying 20 results from an estimated 700 matches similar to: "declarations in non-exported headers and embedding R"
2007 Oct 17
0
Using R.dll in .NET IPC
Hi - I wrapped R.dll up using somebody code online (see below). I am comparing R on .NET IPC with R(D)COM.
I got it all working. Except, I realize that in my client code of the IPC remoting, if I call 'plot' function in R via EvaluateNoReturn, I don't seem to see any results on the R plot window (although the window pops up). Is there anything to do with the code of R.dll wrapper
2006 Nov 27
1
R.DLL mapping by P/Invoke
After a long processing, I was able to create a version of a small C# class
that was able to emulate the rproxy by P/Invoke. This is mostly to find a
workaround a performance problem of the StatConnector.
It's almost work but ... I have strange memory exception when I call the
print function. The variable seems to not survive from one call to the
other.
As there is no debug symbol for
2007 Jan 18
0
Emulating a REPL in frontends
A common need in R frontends is to provide some sort of read, (parse),
evaluate, print loop. However, there are also a number of points where
frontends may want to differ from the standard REPL as available e.g. in
R_ReplDLLdo1().
First some thoughts on what is needed, and what is already there, or missing.
If you want to skip over this, a short summary is provided in the second
half, below
2010 Jan 07
1
Segfault in GetNewPage, memory.c.
Hello.
I'm still working on my OCaml-R binding and I get a segfault in the
GetNewPage() function of memory.c.
For the record, the OCaml-R binding seems to work fine with OCaml
bytecode. The segfault here is the main issue I have with OCaml native
code. OCaml-R can be found on the following links.
Source code:
http://yziquel.homelinux.org/gitweb/?p=ocaml-r.git;a=summary
2010 Jan 02
1
R_PreserveObject, R_ReleaseObject : reference counting needed ?
Hello,
We are currently making lots of changes to Rcpp (see the open Rcpp
mailing list if interested [1] in the details).
We are now using [2] R_PreserveObject and R_ReleaseObject to manage
garbage collection instead of the PROTECT/UNPROTECT dance. This seems to
work well, but I was wondering if there was documentation about it.
In particular, if we preserve the same SEXP twice (or more),
2014 Mar 06
2
A question about multiple(?) out of order ReleaseObject
Hello,
This is a question that probably reveals my lack of understanding.
In a C function (call it cfunc), i created a SEXP, called S, and then
called R_PreserveObject on S.
I returned the SEXP to the calling R function (call it rfunc). Note, I
didn't call
R_ReleaseObject on S.
v <- .Call("cfunc")
So, are the following statements correct
1. S is 'doubly' protected
2010 Jan 02
3
R-devel Digest, Vol 83, Issue 2
[Disclaimer: what is below reflects my understanding from reading the R
source, others will correct where deemed necessary]
On 1/2/10 12:00 PM, r-devel-request at r-project.org wrote:
>
> Hello,
>
> We are currently making lots of changes to Rcpp (see the open Rcpp
> mailing list if interested [1] in the details).
>
> We are now using [2] R_PreserveObject and R_ReleaseObject
2014 Mar 07
0
Repost: (apologies for HTML post) A question about multiple(?) out of order ReleaseObject
Apologies, I am resending this because my emails seem to go in HTML form.
Hello,
This is a question that probably reveals my lack of understanding.
In a C function (call it cfunc), i created a SEXP, called S, and then
called R_PreserveObject on S.
I returned the SEXP to the calling R function (call it rfunc). Note, I
didn't call
R_ReleaseObject on S.
v <- .Call("cfunc")
So,
2014 Mar 07
0
Many apologies: last post: A question about multiple(?) out of order ReleaseObject
Apologies, I am resending this because my emails seem to go in HTML form.
(I haven't as yet figured gmail web interface)
Hello,
This is a question that probably reveals my lack of understanding.
In a C function (call it cfunc), i created a SEXP, called S, and then
called R_PreserveObject on S.
I returned the SEXP to the calling R function (call it rfunc). Note, I
didn't call
2008 Feb 22
1
Calling R_PreserveObject from embedded R
Hello. This is my first post to the list, so first I'd like to thank
everybody for making and mantaining such a great product as R.
I'm writting a native binding to R from Dolphin Smalltalk. I've followed up
the examples of the documentation showing how to run R embedded, and I got
it partially working. However, I have a problem with the reference handling
of the R objects.
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
2008 Jul 20
1
garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not
Dear list,
While trying to identify the root of a problem I am having with
garbage collected variables,
I have come across the following oddity: depending on whether --verbose is set
or not, I obtain different results.
I have made a small standalone example to demonstrate it.
The example is very artificial, but I had a hard time reproducing
reliably the problem.
So when I do: (the content of
2005 Sep 18
0
Updated rawConnection() patch
Here's an update of my rawConnection() implementation. In addition to
providing a raw version of textConnection(), this fixes two existing
issues with textConnection(): one is that the current textConnection()
implementation carries around unprotected SEXP pointers, the other is
a performance problem due to prolific copying of the output buffer as
output is accumulated line by line.
This new
2024 Apr 25
1
Big speedup in install.packages() by re-using connections
On Thu, 25 Apr 2024 14:45:04 +0200
Jeroen Ooms <jeroenooms at gmail.com> wrote:
> Thoughts?
How verboten would it be to create an empty external pointer object,
add it to the preserved list, and set an on-exit finalizer to clean up
the curl multi-handle? As far as I can tell, the internet module is not
supposed to be unloaded, so this would not introduce an opportunity to
jump to an
2008 Aug 04
2
Parsing code with newlines
Dear List,
When I try to parse code containing newline characters with R_ParseVector, I
get a compilation error. How can I compile code that includes comments and
newlines?
I am using the following:
void* my_compile(char *code)
{
SEXP cmdSexp, cmdExpr = R_NilValue;
ParseStatus status;
PROTECT (cmdSexp = allocVector (STRSXP, 1));
SET_STRING_ELT (cmdSexp, 0, mkChar (code));
2009 Nov 30
1
:Re: PROTECT and OCaml GC.
>>> On Nov 28, 2009, at 7:50 PM, Guillaume Yziquel wrote:
>>>
>>> FWIW what I think you should be really looking at is
>>> R_PreserveObject/R_ReleaseObject.
>
> OK. Thanks.
>>> I would suggest looking at the many other R embeddings in other
>>> languages that already exist since I don't think you approach is
>>> very viable
2024 Sep 02
1
Big speedup in install.packages() by re-using connections
On 4/25/24 17:01, Ivan Krylov via R-devel wrote:
> On Thu, 25 Apr 2024 14:45:04 +0200
> Jeroen Ooms <jeroenooms at gmail.com> wrote:
>
>> Thoughts?
> How verboten would it be to create an empty external pointer object,
> add it to the preserved list, and set an on-exit finalizer to clean up
> the curl multi-handle? As far as I can tell, the internet module is not
>
2008 Mar 19
1
R_ParseVector problem: it's cutting off after the decimal point
Dear all,
my aim is to integrate R in an interactive visualisation software
called Bulk Analyzer developed by VrVis (http://www.vrvis.at).
the code:
SEXP e, tmp;
ParseStatus status;
PROTECT(tmp = mkString("x <- c(1.234,-3.45)"));
PrintValue(tmp);
PROTECT(e = R_ParseVector(tmp, -1, &status, R_NilValue));
PrintValue(e);
UNPROTECT(2);
produces the following output:
[1] "x
2013 Oct 16
1
Parallel R expression evaluations
Hi all,
I am using R-3.0.1 under Linux platform to embed R into my C++ code.
I am facing an error while executing more than 1 R-expressions parallelly.
I am executing round(X) and abs(X) parallelly on a set of 50 input rows
which resulted in segmentation fault after getting the following errors.
Error: unprotect_ptr: pointer not found
Error: argument to 'findVar' is not an environment
2019 Apr 05
2
Parsing code with newlines
Hello!
This is my first post here. I came across the very same problem.
It can be reproduced within modified tests/Embedding/RParseEval.c
Actually this example has another issue, namely it doesn't wrap
everything in R_ToplevelExec . This is a major show stopper for
newcomers as that function is barely mentioned anywhere and longjmp into
terminated setuploop function followed by R_suicide