similar to: readLines() segfaults on large file & question on how to work around

Displaying 20 results from an estimated 7000 matches similar to: "readLines() segfaults on large file & question on how to work around"

2017 Sep 03
2
readLines() segfaults on large file & question on how to work around
Jeroen: Thank you for pointing me to ndjson, which I had not heard of and is exactly my case. My experience: jsonlite::stream_in - segfaults ndjson::stream_in - my fault, I am running Ubuntu 14.04 and it is too old so it won't compile the package corpus::read_ndjson - works!!! Of course it does a different simplification than jsonlite::fromJSON, so I have to change some code, but
2017 Sep 02
1
readLines() segfaults on large file & question on how to work around
Thank you for your suggestion. Unfortunately, while R doesn't segfault calling readr::read_file() on the test file I described, I get the error message: Error in read_file_(ds, locale) : negative length vectors are not allowed Jen On Sat, Sep 2, 2017 at 1:38 PM, Ista Zahn <istazahn at gmail.com> wrote: > As s work-around I suggest readr::read_file. > > --Ista > > >
2017 Sep 04
0
readLines() segfaults on large file & question on how to work around
Although the problem can apparently be avoided in this case. readLines causing a segfault still seems unwanted behaviour to me. I can replicate this with the example below (sessionInfo is further down): # Generate an example file l <- paste0(sample(c(letters, LETTERS), 1E6, replace = TRUE), collapse="") con <- file("test.txt", "wt") for (i in
2017 Sep 02
0
readLines() segfaults on large file & question on how to work around
As s work-around I suggest readr::read_file. --Ista On Sep 2, 2017 2:58 PM, "Jennifer Lyon" <jennifer.s.lyon at gmail.com> wrote: > Hi: > > I have a 2.1GB JSON file. Typically I use readLines() and > jsonlite:fromJSON() to extract data from a JSON file. > > When I try and read in this file using readLines() R segfaults. > > I believe the two salient
2018 Sep 04
3
Lectura Archivo JSON
Hola comunidad eRrera, Acudo a ustedes después de pelearme un rato y salir perdedor con la lectura de un archivo json. Por el momento he conseguido leerlo y transformar la parte que me interesa a data frame, sin embargo no consigo poder manipular los datos para calcular por ejemplo la media de una de las variables. El código que estoy ejecutando es: library(jsonlite) json_data <-
2018 May 08
3
help with json data from the web into data frame in R
Hi David, .. I think I've got it :-) Please let me know if you see anything glaringly wrong with this: library(RCurl) zWebObj <- postForm("https://www.semantic-mediawiki.org/w/api.php", "action" = "ask", "query" = "[[Category:City]]|?Capital%20of|?Has%20area", "format" = "json" .opts = list(ssl.verifypeer =
2018 May 08
3
help with json data from the web into data frame in R
Right. I'm trying to access a server within my organization which has a cert error that I cannot fix. The example link I provided was to a site on the web that does not have the cert error. From the linux shell I use the "-k" switch with cURL to ignore cert errors.. is there an equivalent in the R world? -Rich -----Original Message----- From: David Winsemius [mailto:dwinsemius
2018 Jun 19
1
readLines function with R >= 3.5.0
Hi Michael: I can confirm Martin's comment. I tested my software with r-devel (r74914) and it works, while with r-patched (r74914) it does not work (it hangs, as it did in R 3.5.0). I apologize for it taking so long for me to test this, but is there any chance this fix could make into R 3.5.1? Thanks. Jen. On Wed, Jun 13, 2018 at 6:24 AM, Michael Lawrence <lawrence.michael at gene.com
2018 Jun 12
2
readLines function with R >= 3.5.0
Hi: I have also just stumbled into this bug. Unfortunately, I can not change the data my program receives from stdin. My code runs in a larger system and stdin is sent to a Docker container running my R code. The protocol is I read a line, readLines("stdin", n=1), do some actions, send output on stdout, and wait for the next set of data. I don't have control over this protocol, so
2018 May 08
2
help with json data from the web into data frame in R
I?ve been tinkering and discovered that the link I need to read json data from is ?https? and there is a certificate warning that I have to click through from a browser. That might be my issue. Is there any way in the json package to tell it to ignore self-signed cert errors in a url? -Rich From: Eric Berger [mailto:ericjberger at gmail.com] Sent: Tuesday, May 08, 2018 11:31 AM To: Evans,
2018 Jun 13
2
readLines function with R >= 3.5.0
>>>>> Michael Lawrence >>>>> on Tue, 12 Jun 2018 19:27:49 -0700 writes: > Hi Jen, This was already resolved for R 3.5.1 by just > disabling buffering on terminal file connections like stdin. and before R 3.5.1 exists, *and* as the change is also not yet available in R patched (!) this means using a version of "R-devel", e.g. for Windows
2018 May 08
3
help with json data from the web into data frame in R
> On May 8, 2018, at 9:03 AM, Evans, Richard K. (GRC-H000) <richard.k.evans at nasa.gov> wrote: > > That said, I have two issues to ask for help with: > > 1) how to ignore cert errors with a fromJSON call If you can do it with curl, then why aren't you doing one of a) a system call, b) installing and loading RCurl, c) installing and loading curl (the R package with that
2018 May 08
0
help with json data from the web into data frame in R
That said, I have two issues to ask for help with: 1) how to ignore cert errors with a fromJSON call And 2) why the json data from the example link doesn't convert to a data frame. As seen in the following example library("rjson") result <- fromJSON(file =
2020 May 11
2
Segfault on read.socket with long message
I'm trying to implement a connection between two processes using a simple socket mechanism. The messages are rather long object stored as JSON. R is crashing with a segmentation fault when I try to read my test message (which is 5305 bytes long). I first send the length in bytes and then I send the actual message. Here is my R code: library(jsonlite) library(futile.logger)
2018 May 08
0
help with json data from the web into data frame in R
> On May 8, 2018, at 8:36 AM, Evans, Richard K. (GRC-H000) <richard.k.evans at nasa.gov> wrote: > > I?ve been tinkering and discovered that the link I need to read json data from is ?https? and there is a certificate warning that I have to click through from a browser. That might be my issue. Is there any way in the json package to tell it to ignore self-signed cert errors in a
2018 May 09
1
help with json data from the web into data frame in R
Regarding the question: From the linux shell I use the "-k" switch with cURL to ignore cert errors.. is there an equivalent in the R world? I have (sometimes) had success by creating a .curlrc file and putting the necessary curl options in it. When R invokes curl, curl picks up the options. [my context was running install.packages( method='curl' ) pointing to a local
2018 May 08
0
help with json data from the web into data frame in R
[non-tabular json data] -- ok.. so I think I need to figure out how to make it tabular. Thanks! [curl] -- I was hoping there was a cleaner way to do it.. using R to evoke cURL to get the data as text and then passing it into getJSON seems to be what I need to do. Do you by chance have an simple example of using RCurl to get a response ignoring cert errors? ty -Rich -----Original Message-----
2020 May 12
1
Segfault on read.socket with long message
Thanks for the link.? Somehow the information about how to join the bugzilla site was not available at bugzilla and buried in the CRAN web site instructions on reporting bugs (which pointed me at Bugzilla and not the page you showed me). The example is pretty minimal.? I left the tracing statements (flog.trace()) and the toJSON, fromJSON in as I thought they might provide some context for
2018 Sep 14
1
Bug 17432 in readLines with R >= 3.5.0 still a problem
Michael: I don't see any comments on Bug 17432 ( https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17432) later than June 1, 2018. Would you please supply a link pointing to the followup to this discussion on bugzilla? Thanks. Jen. > On Thu Sep 13 14:14:46 CEST 2018 Michael Lawrence wrote: > > Thanks, I responded to this on bugzilla. > On Wed, Sep 12, 2018 at 9:04 AM Chris
2016 Dec 15
2
print.POSIXct doesn't seem to use tz argument, as per its example
On the documentation page for DateTimeClasses, in the Examples section, there are the following two lines: format(.leap.seconds) # the leap seconds in your time zone print(.leap.seconds, tz = "PST8PDT") # and in Seattle's The second line (using print) seems to ignore the tz argument, and prints the dates in my time zone, while: format(.leap.seconds, tz =