search for: rconn_fgetc

Displaying 7 results from an estimated 7 matches for "rconn_fgetc".

2004 Jun 30
2
Slow IO: was [R] naive question
...equivalent C code. It turned out to be 20 - 50 times slower. I can see at least two main reasons why R's IO is so slow (I didn't profile this though): A) it reads from a connection char-by-char as opposed to the buffered read. Reading each char requires a call to scanchar() which then calls Rconn_fgetc() (with some non-trivial overhead). Rconn_fgetc() on its part is defined somewhere else (not in scan.c) and therefore the call can not be inlined, etc. B) mkChar, which is used very extensively, is too slow. There are ways to minimize the number of calls to mkChar, but I won't expand on it in t...
2012 Aug 13
1
compile fails with x86_64-alpine-linux-uclibc-gcc
hello, i am trying to build R on alpine/gentoo with uclibc and it fails with the following error msg: connections.c: In function 'Rconn_fgetc': connections.c:3184:11: error: expected identifier before '(' token connections.c:3186:15: error: expected identifier before '(' token make[3]: *** [connections.o] Error 1 here is the whole build log :http://bpaste.net/show/39955/ any idea? i've *walked* back the versions...
2015 Sep 21
5
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
...king copy) @@ -42,12 +42,12 @@ /* Use R_alloc as this might get interrupted */ static char *Rconn_getline2(Rconnection con) { - int c, bufsize = MAXELTSIZE, nbuf = -1; + int c, bufsize = MAXELTSIZE, nbuf = 0; char *buf; buf = R_alloc(bufsize, sizeof(char)); while((c = Rconn_fgetc(con)) != R_EOF) { - if(nbuf+2 >= bufsize) { // allow for terminator below + if(nbuf+1 >= bufsize) { // allow for terminator below bufsize *= 2; char *buf2 = R_alloc(bufsize, sizeof(char)); memcpy(buf2, buf, nbuf); @@ -54,17 +54,19 @@ buf = buf2; } if(c != ...
2015 Sep 21
0
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
...R_alloc as this might get interrupted */ > static char *Rconn_getline2(Rconnection con) > { > - int c, bufsize = MAXELTSIZE, nbuf = -1; > + int c, bufsize = MAXELTSIZE, nbuf = 0; > char *buf; > > buf = R_alloc(bufsize, sizeof(char)); > while((c = Rconn_fgetc(con)) != R_EOF) { > - if(nbuf+2 >= bufsize) { // allow for terminator below > + if(nbuf+1 >= bufsize) { // allow for terminator below > bufsize *= 2; > char *buf2 = R_alloc(bufsize, sizeof(char)); > memcpy(buf2, buf, nbuf); > @@ -54,17 +54,19 @@ >...
2003 Aug 25
16
R tools for large files
I'm wondering if anyone has written some functions or code for handling very large files in R. I am working with a data file that is 41 variables times who knows how many observations making up 27MB altogether. The sort of thing that I am thinking of having R do is - count the number of lines in a file - form a data frame by selecting all cases whose line numbers are in a supplied vector
2015 Sep 21
2
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
Here's an update: I checked the ChangeLog for R, and it seems like readDCF was changed in 3.0.2. I went on a whim and copied src/main/dcf.c from R 2.15.3 over to 3.2.2, and R compiled fine and install.packages now work for me. This is probably not ideal, but it at least makes R usable on AIX for me. Would definitely like to help figure out what's wrong with the new dcf.c on AIX.
2012 Aug 11
2
compile fails with x86_64-alpine-linux-uclibc-gcc
hello, i am trying to build R on alpine/gentoo and it fails with the following error msg: connections.c: In function 'Rconn_fgetc': connections.c:3184:11: error: expected identifier before '(' token connections.c:3186:15: error: expected identifier before '(' token make[3]: *** [connections.o] Error 1 any idea? [see the attached file for a complete build log.] i've walked back the versions down to 2.1...