similar to: Custom connections

Displaying 20 results from an estimated 1400 matches similar to: "Custom connections"

2020 May 06
2
defining r audio connections
yep, you're right, after some initial clean-up and running with or without --as-cran R CMD check gives a NOTE * checking compiled code File ?socketeer/libs/socketeer.so?: Found non-API calls to R: ?R_GetConnection?, ?R_new_custom_connection? Compiled code should not call non-API entry points in R. See 'Writing portable packages' in the 'Writing R
2020 May 07
1
defining r audio connections
https://github.com/jimhester/archive was not allowed on CRAN when I submitted it 3 years ago due to this restriction. Being able to write custom connections is a useful feature for a number of applications, I would love this policy to be reconsidered. On Wed, May 6, 2020 at 10:30 PM Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote: > What's the gist of the problem of
2006 Oct 09
1
Discussion starter for package level Connection API
Thought I'd try and start a discussion. Feel free to jump in. I guess R needs to strike the right balance between opening up the internals to package writers and not allowing them to do bad things. My first attempt at cracking this nut is to just memcpy() the Rconnection and not allow access to the private stuff: /* Alternative to allowing C code access to connection API. */ Rconnection
2020 May 07
0
defining r audio connections
What's the gist of the problem of making/having this part of the public API? Is it security, is it stability, is it that the current API is under construction, is it a worry about maintenance load for R Core, ...? Do we know why? It sounds like it's a feature that is useful. I think we missed out on some great enhancements in the past because of it not being part of the public API.
2020 May 06
2
defining r audio connections
The public connection API is defined in https://github.com/wch/r-source/blob/trunk/src/include/R_ext/Connections.h I'm not sure of a good pedagogic example; people who want to write their own connections usually want to do so for complicated reasons! This is my own abandoned attempt
2018 Oct 31
1
PATCH: Asserting that 'connection' used has not changed + R_GetConnection2()
SUMMARY: I'm proposing that R assert that 'connection' options have not changed since first created such that R will produce the following error: > fh <- file("a.txt", open = "w+") > cat("hello\n", file = fh) > close(fh) > fh2 <- file("b.txt", open = "w+") > cat("world\n", file = fh2) >
2009 Nov 07
1
getConnection, R_outpstream_st
Hello, I'm trying to use the limited connections api defined in Rinternals.h. I have code that looks like this (inspired from do_serializeToConn) : SEXP serialize_to_connection( SEXP xp, SEXP connection ){ Rconnection con ; struct R_outpstream_st out; R_pstream_format_t type = R_pstream_binary_format ; SEXP (*hook)(SEXP, SEXP) = NULL ; con = getConnection(Rf_asInteger(connection));
2006 Oct 07
1
Request to open up getConnection to embedded interface
Hello all, I would like to request that getConnection() and the struct Rconn declarations be added to the R embedded interface. Here's why. It's common in CGI scripts for web applications to direct stdin, stdout, and stderr map to reading from the browser, writing to the browser, and writing to a web log file respectively; very nice and neat. However, things get a little hairy once
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
2007 Apr 06
1
getConnection is not found in R depending on the Linux flavour (RedHat or Debian) - dyn.load problems
Hello R developers, I am working on the "seqinr" package and I encounter a tricky problem using a C function. We defined a C fonction called "getzlibsock" which is dedicated to compressed socket connections. This function is using the R internal C function called "getConnection(int)" in order to get information about the socket previously opened with the
2006 Apr 13
1
bus error on calling nmmin
Hi, I'm trying to get a toy program making use of nmmin to run successfully. I've gotten to the point of compiling. However, when I attempt to run my executable, I guess a bus error. I see that someone else has asked about using nmmin before <http://tolstoy.newcastle.edu.au/R/help/06/03/23944.html>, but I haven't come across any replies. Is there some documentation on how to
2009 Oct 09
1
celebrating revision 50000
Hello, Today, Brian Ripley commited the revision 50000 of R's svn repository. I took this as an opportunity to do some data analysis of the log and posted some code and graphics on my blog: http://romainfrancois.blog.free.fr/index.php?post/2009/10/09/celebrating-R-commit-50000 The plots of the number of commits per day (and per month) indicates a peak in 2002. Here are the top 20
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
The patch below adds support for custom HTTP headers in download.file() and url(). My main motivation for this is performing basic http authentication. Some web sites do not support embedding the credentials into the URI itself, they only work if the username and password are sent in the HTTP headers. In fact specifying the username and password in the URI has been
2005 Oct 10
2
Catching warning and error output
Hi all, I'm working on a GUI frontend for R, and I'm looking for a good way to catch all warning- and error-output. The reason for this is mostly, that I would like to know, which sections of the output are "normal" output, warnings, and errors. This would allow for some nice features, such as highlighting warnings and errors in a different color, or popping up a message
2016 Nov 13
1
Memory leak with tons of closed connections
Using dup() before fdopen() (and calling fclose() on the connection when it is closed) indeed fixes the memory leak. FYI, Gabor Index: src/main/connections.c =================================================================== --- src/main/connections.c (revision 71653) +++ src/main/connections.c (working copy) @@ -576,7 +576,7 @@ fp = R_fopen(name, con->mode); } else { /* use
2010 Dec 13
1
errors in getconnection or scan
I was wondering if there was a function like "does connection exists" ? I am currently using loops to build up a database, and I have either > B = getConnection(localization) Error in getConnection(localization) : there is no connection -2147483648 In addition: Warning message: In getConnection(localization) : NAs introduced by coercion or > B = scan(localization) Error in
2007 May 24
2
object getConnection
Hi, I use the functions socketConnections() and getConnection() which are working fine. Thanks to the authors. After opening nicely some socketConnection, getConnection(3) returns something like : description class mode text opened can read can write "->127.0.0.1:7496" "socket" "wb" "binary" "opened" "yes"
2007 May 30
5
Possible changes to connections
When I originally implemented connections in R 1.2.0, I followed the model in the 'Green Book' closely. There were a number of features that forced a particular implementation, and one was getConnection() that allows one to recreate a connection object from a number. I am wondering if anyone makes use of this, and if so for what? It would seem closer to the R philosophy to have
2007 Nov 14
1
isOpen on closed connections
As far as I can tell, 'isOpen' cannot return FALSE in the case when 'rw = ""'. If the connection has already been closed by 'close' or some other function, then isOpen will produce an error. The problem is that when isOpen calls 'getConnection', the connection cannot be found and 'getConnection' produces an error. The check to see if it is
2005 Aug 22
2
RFC: "loop connections"
I've just implemented a generalization of R's text connections, to also support reading/writing raw binary data. There is very little new code to speak of. For input connections, I wrote code to populate the old text connection buffer from a raw vector, and provided a new raw_read() method. For output connections, I wrote a raw_write() to append to a raw vector. On input, the mode