Displaying 20 results from an estimated 700 matches similar to: "capture.output(): Using a rawConnection() [linear] instead of textConnection() [exponential]?"
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
2018 Nov 12
2
Better cleanup of example session during check
I have a couple of packages (?fiery? and ?reqres') that uses a mock of a rook request for their examples. The mock is an R6 object containing a rawConnection, along with a finalizer that closes this connection when the object is removed. So far so good. I?ve recently been getting CRAN errors due to the rawConnection not being closed in examples
> cleanEx()
Error: connections left open:
2018 Nov 12
0
Better cleanup of example session during check
On 12/11/2018 8:09 AM, Thomas Lin Pedersen wrote:
> I have a couple of packages (?fiery? and ?reqres') that uses a mock of a rook request for their examples. The mock is an R6 object containing a rawConnection, along with a finalizer that closes this connection when the object is removed. So far so good. I?ve recently been getting CRAN errors due to the rawConnection not being closed in
2007 Jul 10
0
Plot dies with memory not mapped (segfault) (PR#9785)
Full_Name: Clay B
Version: 2.5.0 (2007-04-23)
OS: Solaris Nevada Build 55b
Submission from: (NULL) (65.101.229.198)
I find that running this script causes R to segfault reliably. However, running
just for one system at a time (modifying the for loop updating iter to run just
for a system at a time works). The system is a Sun W2100z with 12 GB of ram, and
R segfaults using only around 360 MB of
2019 Dec 06
2
long vector support
All,
At first glance, a recent commit to R-devel (
https://github.com/wch/r-source/commit/2c182014ecc8c2407a89092c9162d86046bd18da)
appears to be related to long vector support. But as Henrik Bengtsson
points out at
https://github.com/HenrikBengtsson/Wishlist-for-R/issues/97#issuecomment-562659134,
writeBin() still prohibits long vectors. Are there any plans to add long
vector support to R
2019 Dec 07
0
long vector support
>>>>> Will L
>>>>> on Fri, 6 Dec 2019 16:02:59 -0500 writes:
> All, At first glance, a recent commit to R-devel (
> https://github.com/wch/r-source/commit/2c182014ecc8c2407a89092c9162d86046bd18da)
> appears to be related to long vector support.
yes, for a very limited case, with a very nice minimal
reproducible example and proper R bug
2020 Jun 29
0
A warning in gzcon but not in gzfile
Hi all,
I used `gzfile` and `gzcon` to read a compressed file but I found that
`gzcon` gave me a different result than `gzfile`. It seems like the `gzcon`
does not handle the data correctly. I have posted an example below. In the
example, a portion of a compressed file is downloaded from Google Cloud as
a raw vector, and the data is saved into a temp file. If I use ` gzfile` to
read the file, it
2005 Aug 17
0
Raw data type transformations
Not sure if this belongs here or on the devel list:
I've needed a more efficient way to manipulate raw binary data in R,
with more than the minimal raw transformation functions in the base
package. So I've written a small package in C that effectively lets
me cast back and forth between raw vectors and other data types.
I've implemented four functions: rawToHex, hexToRaw, readRaw,
2020 May 01
0
Request: tools::md5sum should accept connections and finally in-memory objects
The tools package is not for users, it's for functions that R uses in
installing packages, checking them, etc. If you want a function for
users, it would belong in utils. But what's wrong with the digest
package? What's the argument that R Core should take this on?
Duncan Murdoch
On 01/05/2020 5:00 p.m., D?nes T?th wrote:
>
> AFAIK there is no hashing utility in base R
2020 May 01
0
Request: tools::md5sum should accept connections and finally in-memory objects
Perhaps use the digest package? Isn't "R the R packages?"
> On May 1, 2020, at 2:00 PM, D?nes T?th <toth.denes at kogentum.hu> wrote:
>
>
> AFAIK there is no hashing utility in base R which can create hash digests of arbitrary R objects. However, as also described by Henrik Bengtsson in [1], we have tools::md5sum() which calculates MD5 hashes of files.
2020 May 01
4
Request: tools::md5sum should accept connections and finally in-memory objects
AFAIK there is no hashing utility in base R which can create hash
digests of arbitrary R objects. However, as also described by Henrik
Bengtsson in [1], we have tools::md5sum() which calculates MD5 hashes of
files. Calculating hashes of in-memory objects is a very common task in
several areas, as demonstrated by the popularity of the 'digest' package
(~850.000 downloads/month).
Upon
2020 May 01
1
Request: tools::md5sum should accept connections and finally in-memory objects
On 5/1/20 11:09 PM, John Mount wrote:
> Perhaps use the digest package? Isn't "R the R packages?"
I think it is clear that I am aware of the existence of the digest
package and also of other packages with similar functionality, e.g. the
fastdigest package. (And I actually do use digest as I guess 99% percent
of the R developers do at least as an indirect dependency.) The point
2019 Dec 12
0
R 3.6.2 is released
Hi.
Under R-news there is an entry for 3.6.2 patched regarding LAPACK. However,
when uncompresding the current R-patched, it creates R-Rc directories. Is
this a naming oversight or is the patched version actually the unadjusted
release candidate?
Thank you,
Avi
On Thu, Dec 12, 2019 at 4:58 AM Peter Dalgaard via R-devel <
r-devel at r-project.org> wrote:
> The build system rolled up
2017 Aug 08
0
Problem with serialization via readRDS() on a textConnection()
Hi All,
I had working code under R v3.2 that serialized an object, stored the
serialized object in a database, and then successfully retrieved and
hydrated that object.
I recently updated to R v3.4.1 and the same code now fails.
Here is the code in question (simplified), and the resulting error:
> zz = textConnection('tempConnection', 'wb')
> saveRDS(c("a",
2017 Aug 09
1
Problem with serialization via readRDS() on a textConnection()
(Sorry for not linking to your message; I accidentally deleted the
original copy of your message.)
Your code
> zz = textConnection('tempConnection', 'wb')
> saveRDS(c("a", "b", "c"), zz, ascii = TRUE)
> serialized_obj = paste(textConnectionValue(zz), collapse='\n')
> readRDS(textConnection(serialized_obj))
Error in
2009 Oct 19
1
source and textConnection
Is this warning given on purpose?
> myconn<-textConnection("print(11*11)")
> source(myconn)
[1] 121
Warning message:
In source(myconn) : argument 'encoding = "native.enc"' will be ignored
Could it be omitted, since the docs state that encoding is only use if
the corresponding argument is a file name or url?
--
Erich Neuwirth, University of Vienna
2005 Mar 22
1
I modify my question in "textconnection output"
dear ALL-R-helper:
I modify my question in "textconnection output":
I wrote one function in Rgui:
output <- function(y){
x <- textConnection("foo","w")
sink(x)
a <-5
b <-6
z <-a*b
z
e <-"spss"
h <-c(1,2,3)
ls()
r<-c("s","p","s","s")
p<-list(1:10)
p
y <- foo
sink()
2008 Dec 16
0
socket server, textConnection and readLines
Hello;
This is bit long email but hope someone can guide me.
I have questions regarding socket, readLines and textConnection. I am
not sure if my code is efficient (due to textConnection) and how to
handle client disconnect and restart of the socket server in R.
I have a huge(3.5+G) text file on machine 'A', which I want to process
on machine 'B' using read.table (one line or a
2010 Aug 16
2
when to use textConnection ??
Hello.
I don't uderstant when to use textConnection and when not.
Some examples do it, some not.
I've even seen something like
con <- textConnection(rev(rev(ReadLines('data.txt'))[-(1:2]))
data <- read.table(con)
close(con)
--
View this message in context: http://r.789695.n4.nabble.com/when-to-use-textConnection-tp2327132p2327132.html
Sent from the R help mailing list
2007 May 15
3
textConnection
hello,
I don't understand what's happen just before the textConnection function runs good but now it doesn't run
> Line[1]
[1] "if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100"
> textConnection(Line[1])
Erreur dans textConnection(Line[1]) : toutes les connexions sont utilisées
why R display that?