Last active
April 26, 2024 23:58
-
-
Save coolbutuseless/2b261e2f7f54206c1263fbca0e71ac64 to your computer and use it in GitHub Desktop.
A proposed email to R-devel on connections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Subject: Clarificaiton requested on 'connections' interface. | |
Hi All, | |
I am confused on the status of being able to create custom connections in R. | |
The functions 'R_new_custom_connection()' and 'R_GetConnection()' | |
(defined in 'R_ext/Connections.h') are marked in 'sotools.c' as 'nonAPI'. | |
This would seem to indicate that it is not for use in packages as it will | |
cause a NOTE on CRAN. | |
However the manual 'Writing R Extensions' explicitly mentions using | |
"R_ext/Connections.h" for defining custom connections i.e. "Facilities | |
for defining custom connection implementations are provided in | |
R_ext/Connections.h, but make sure you consult the file before use." | |
Additionally 'R_GetConnection()' is mentioned in the R 3.3.0 NEWS as | |
allowing "packages implementing connectionsto convert R connection objects | |
to Rconnection handles" | |
In summary: | |
1. Can "R_new_custom_connection()" and "R_GetConnection()" | |
be used in packages? | |
2. If not, is there any other way for users to create custom connections? | |
3. If there is no current way to create custom connections, would | |
making this interface officially available be considered? | |
Thank you for your time, | |
Mike. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the timing, you may want to preface this by clarifying that you're asking for a specific package/project you've been developing, and not from an armchair perspective trying to stir up controversy (which would smell like you're trying to "trick" R-core members into contradictions – this is a bit how I interpreted the defensive response to Hadley's comments on some R-exts literal interpretation, that he was making bad-faith arguments (definitely not saying that he was, just that it seems to have been interpreted that way)).