Displaying 20 results from an estimated 5000 matches similar to: "Finalization and external pointers"
2020 Apr 03
4
The finalizer of the externalPtr does not work when closing R?
Hi all,
I found that the finalizer of the externalPtr is not called when R is
quitting. However, manually calling GC() works fine. This behavior is
observed on devel R 2020-04-02 r78142 on Win and R 3.6.3 on Ubuntu. I make
a reproducible package here: https://github.com/Jiefei-Wang/example
Here is the detail of how to reproduce the problem, I create a temporary
file in the package root path and
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
--
2007 Mar 14
1
allocVector reference
Hi,
I'm trying to write a function to return an R vector which points
directly to a contiguous subset of another vector, without taking a
copy. Since SEXPREC is a header followed by the data, rather than the
header plus a pointer to the data, I'm not sure what I'm trying to do is
possible. Is there a way of doing this? Similar in spirit to how the R
assignment "x=y" does
2013 Nov 03
1
on.exit() & sys.on.exit(): Calling them via eval() does not work as hoped
Why does the following eval() call on sys.on.exit() not return what I
expect/evaluate in the proper environment?
foo <- function() {
cat("foo()...\n");
on.exit( message("exiting") )
cat("sys.on.exit():\n")
res <- sys.on.exit()
print(res)
cat("eval(sys.on.exit()):\n")
expr <- quote(sys.on.exit())
print(expr)
res <- eval(expr)
2004 Jun 10
1
tryCatch() and preventing interrupts in 'finally'
With tryCatch() it is possible to catch interrupts with tryCatch(). Then you
can use a 'finally' statement to clean up, release resources etc. However,
how can I "protect" against additional interrupts? This is a concern when
the hold down Ctrl+C and generates a sequence of interrupts. Example:
tryCatch({
cat("Press Ctrl+C...\n");
Sys.sleep(5);
}, interrupt =
2014 Oct 27
1
proper use of reg.finalizer to close connections
Hi all, I have a question about finalizers...
I have a package that manages state for a few connections, and I'd
like to ensure that these connections are 'cleanly' closed upon either
(i) R quitting or (ii) an unloading of the package.
So, in a pared-down example package with a single R file, it looks
something like:
##### BEGIN PACKAGE CODE #####
.CONNS <- new.env(parent =
2001 Jul 10
1
Object finalization
I see some code in R to attach finalizers to external pointer references
(Register[C]Finalizer). Anyone have an example of how to code the
finalizer? R_RegisterCFinalizer accepts a C function, but I can't see
how to get it to operate on the pointer, since the pointer is not passed
to the function when its called. RegisterFinalizer takes an R closure,
but how is it called from R (tried
2005 Mar 18
2
Trouble debugging with gdb, R on Windows
I'm trying to follow the example in the R for Windows FAQ on running
gdb and am getting stuck because gdb tells me "Cannot access memory at
address ...".
Here's what my gdb session looks like (This one from a cygwin shell,
but same results from plain Windows CMD shell):
$ cd R-devel/src/gnuwin32
$ gdb ../../bin/Rgui.exe
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation,
2002 Mar 29
2
wmf on Unix?
libEMF (http://sourceforge.net/projects/libemf/) looks like it may be
the solution to generating WMF/EMF files on Unix. It's a general-purpose
(LGPL) library that implements the EMF API ...
(I was originally going to write to the list to ask why small circles
appear to be filled (in src/gnuwin32/graphapp/gdraw.c) by generating a
series of rectangles rather than using some kind of
2000 Jun 26
1
using graphapp.h
Another question
"graphapp.h" in R1.1 defines number of plotting function. is there an
example of how to use them?
Thank.
---------------------------
Vadim Kutsyy
vadim at kutsyy.com
http://www.kutsyy.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2000 Jun 26
1
using graphapp.h
Another question
"graphapp.h" in R1.1 defines number of plotting function. is there an
example of how to use them?
Thank.
---------------------------
Vadim Kutsyy
vadim at kutsyy.com
http://www.kutsyy.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
1998 Sep 16
4
R-beta: A new version of R-0.62.3 for Win3.1/Win32s, Win95 and WinNT
I have just made available on ftp://sirio.stat.unipd.it/pub/R a
new version of R for MsWindows compiled with gcc-mingw32.
Enclosed you can find the README. Since there are many news
(with respect to my previous port, rw0613), please read it.
guido
------------------------ README ----------------------------------------
rw0623b.zip is a binary distribution of R (based on the last
1998 Sep 16
4
R-beta: A new version of R-0.62.3 for Win3.1/Win32s, Win95 and WinNT
I have just made available on ftp://sirio.stat.unipd.it/pub/R a
new version of R for MsWindows compiled with gcc-mingw32.
Enclosed you can find the README. Since there are many news
(with respect to my previous port, rw0613), please read it.
guido
------------------------ README ----------------------------------------
rw0623b.zip is a binary distribution of R (based on the last
1998 Sep 16
4
R-beta: A new version of R-0.62.3 for Win3.1/Win32s, Win95 and WinNT
I have just made available on ftp://sirio.stat.unipd.it/pub/R a
new version of R for MsWindows compiled with gcc-mingw32.
Enclosed you can find the README. Since there are many news
(with respect to my previous port, rw0613), please read it.
guido
------------------------ README ----------------------------------------
rw0623b.zip is a binary distribution of R (based on the last
2023 Jan 20
1
about RGui HighDPI awareness on windows
Dear all:
Now RGui on windows no HighDPI awareness.try add HighDPI awareness to RGui in last two days.
I write an initial POC(just for verify and only SystemDPI awareness partial implemented) , try to mod graphapp used in R to implemented DPI scaling.
it seems works on my laptop , but need further test.
So I post the patch https://github.com/armgong/misc-r-patch/blob/main/dpi-c-code.diff
2017 Sep 04
1
Suggestion: Create On-Disk Dataframes
On 4 September 2017 at 11:35, Suzen, Mehmet wrote:
| It is not needed. There is a large community of developer using SparkR.
| https://spark.apache.org/docs/latest/sparkr.html
| It does exactly what you want.
I hope you are not going to mail a sparkr commercial to this list every day.
As the count is now at two, this may be an excellent good time to stop it.
Dirk
--
2006 Nov 14
2
Building R from source
Hello,
I was trying to build R from source on Windows XP. I installed software which are mentioned from the follow web page http://www.murdoch-sutherland.com/Rtools/ (Last accessed on Nov. 13th, 2006) . Unfortunately, I got error messages whenever I run 'make all recommended' without modifying 'MkRules' file. I have removed software and reinstalled them several times but I still
2002 May 09
2
Help on creating custom financial time series graphs
I have written a series of C modules that produce various custom (technical
analysis) graphs when presented with a financial time series. The code was
developed on the Win2K and so makes many now level function calls to the GDI
etc, and is very tightly wedded to the Win2k windowing system. I notice
however, that most of the graphing functionality in R (at least on the
Windows OS) is handled
2007 Aug 03
2
How to properly finalize external pointers?
Dear R .Call() insiders,
Can someone enlighten me how to properly finalize external pointers in C code (R-2.5.1 win)? What is the relation between R_ClearExternalPtr and the finalizer set in R_RegisterCFinalizer?
I succeeded registering a finalizer that works when an R object containing an external pointer is garbage collected. However, I have some difficulties figuring out how to do that in an
2004 Aug 20
2
Error messages and C
I am calling a C (C++ really) function via the .C interface.
Sometimes when things go wrong I want to return an error message.
1. R provides C functions error and warning which look about right.
But exactly how does this exit, and in particular what happens with
cleaning up, calling C++ destructors, and unwinding the stack? Will I
get memory leaks?
2. Before I discovered those functions, I