Thanks Iris, Bert, and Tim.
Whether unz() is blocking or not by default doesn’t seem to be documented.
Indeed, thank you Iris for finding out that explicitly opening it as blocking
would work. That made me wonder if it’s non-blocking by default then, which
would have been surprising. However, e
Hi,
you could use "scan" instead, it seems to work fine also when wrapped
around "unz".
Or, alternatively, you could use "unzip" instead of "unz". It works as
expected, i.e. reads the last incomplete line and throws a warning about
this.
So it seems to me that "unz" creates a non-blocking con
Hi again,
The unz connection is non-blocking by default. I checked do_unz which calls
R_newunz which calls init_con and the only place in any of those functions
that sets 'blocking' is init_con which sets it to FALSE:
https://github.com/wch/r-source/blob/0c26529e807a9b1dd65f7324958c17bf72e1de1a/
Às 09:11 de 23/10/2024, Reuver, B de (epi) via R-help escreveu:
Hello,
I was working on an R script using the datediff object, to log certain
durations in the data processing.
I ran in to the issue that outputing a datediff object using PASTE will leave
out the time unit by default.
When you
Hello,
I was working on an R script using the datediff object, to log certain
durations in the data processing.
I ran in to the issue that outputing a datediff object using PASTE will leave
out the time unit by default.
When you paste() or as.character() a datediff object it only outputs the
n
> "pd" == peter dalgaard
> on Thu, 24 Oct 2024 11:00:25 +0200 writes:
pd> This is probably Apple Silicon specific, not OSX per se:
>> sum(rep(1 / 9, 9)) - 1
pd> [1] 0
>> On 23 Oct 2024, at 07:26 , Stevie Pederson
>> wrote:
>>
>> sum(rep(1 / 9, 9)) - 1 #
Dear list,
I'm seeing a strange interaction with readLines() and unz() when reading
a file without an empty final line. The final line gets dropped silently:
> cat("hello", file = "hello.txt")
> zip("hello.zip", "hello.txt")
adding: hello.txt (stored 0%)
> readLines(unz("hello.zip", "hello.txt"
7 matches
Mail list logo