Displaying 20 results from an estimated 300 matches similar to: "scan(..., skip=1e11): infinite loop; cannot interrupt"
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
On Fri, 10 Feb 2023 23:38:55 -0600
Spencer Graves <spencer.graves at prodsyse.com> wrote:
> I have a 4.54 GB file that I'm trying to read in chunks using
> "scan(..., skip=__)". It works as expected for small values of
> "skip" but goes into an infinite loop for "skip=1e11" and similar
> large values of skip: I cannot even interrupt it; I
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
Hello, All:
I have a 4.54 GB file that I'm trying to read in chunks using
"scan(..., skip=__)". It works as expected for small values of "skip"
but goes into an infinite loop for "skip=1e11" and similar large values
of skip: I cannot even interrupt it; I must kill R. Below please find
sessionInfo() with a toy example.
My real problem is a large
1999 Oct 30
1
read.table problem on Linux/Alpha (seg faults caused by isspace(R_EOF)) (PR#303)
Full_Name: Naoki Takebayashi
Version: 0.65.1
OS: Linux/Alpha
Submission from: (NULL) (129.79.224.171)
When I was reading a file with read.table("junk.data"), it seg-faulted.
I found out that it seg-faulted when the last line of data file didn't
have the newline char. For example, file like this:
23 3
31 2
24 1<EOF>
Here is a fix.
--- R-0.65.1/src/main/scan.c.orig
2008 Sep 14
4
Fetching a range of columns
Hello,
I realize that using: x[x > 3 & x < 5] I can fetch all elements between 3
and 5. However I read in from a CSV file, and I would like to fetch all
columns from within a range ( 842-2411). In teh past, I have done this to
fetch just select few columns:
data <- read.csv(filein, header=TRUE, nrows=320, skip=nskip)
data_filter <- data[c(2,12,17)]
2009 Feb 21
0
density estimation for d>2 for the DPpackage
Dear List,
I am trying to estimate a 3 dimensional density through the DPpackage.
For example
# model
sigma <- matrix(c(0.1,0.05,0.05,0.05,0.1,0.05,0.05,0.05,0.1), ncol=3)
rnormm<- rmvnorm(n=100, mean=c(5,100,150), sigma=sigma)
sigma2 <- matrix(c(10,0.05,0.05,0.05,10,0.05,0.05,0.05,10), ncol=3)
rnormm2<- rmvnorm(n=100, mean=c(20,1,110), sigma=sigma)
rnormm<-rbind(rnormm,rnormm2)
2023 Jul 21
1
tools::parseLatex() crashes on "\\verb{}"
Surprisingly this invalid latex syntax is still formatted "right" in the
html output.
On a closer look it seems like roxygen2 introduces those, when using
markdown backtick quoting, if the quoted content is not syntactic. For
instance:
#' `c(c(1)`
#' `c(c(1))`
Will convert the first line to `\verb{c(c(1)}` and the second to
`\code{c(c(1))}`.
I've opened a ticket there FYI:
2015 Sep 21
0
Long vectors: Missing values and R_xlen_t?
On Sep 20, 2015, at 3:06 PM, Henrik Bengtsson <henrik.bengtsson at ucsf.edu> wrote:
> Is there a missing value constant defined for R_xlen_t, cf. NA_INTEGER
> (== R_NaInt == INT_MIN) for int(eger)? If not, is it correct to
> assume that missing values should be taken care/tested for before
> coercing from int or double?
>
R_xlen_t is type of the vector length (see
2013 Jul 12
1
robustbase compilation problem: probably boneheaded? maybe 32-bit?
With a recent SVN build (R Under development (unstable) (2013-07-10
r63264) -- "Unsuffered Consequences"), I'm having trouble installing the
robustbase package. The bottom line is that I *think* it's a
32-bit-system problem, but I could easily be mistaken.
robustbase is passing its package checks:
http://cran.r-project.org/web/checks/check_results_robustbase.html
... but from
2017 Aug 28
0
[bug report] Cyrillic letter "я" interrupts script execution via R source function
My understanding (which could be wrong) is that when you source a file,
it first gets translated to your native locale and then parsed. When you
parse a character vector, it does not get translated.
In your locale, every "?" character (U+044F) gets replaced by the byte
"\xFF":
> iconv("\u044f", "UTF-8", "Windows-1251")
[1]
2017 Aug 27
0
R_xlen_t is an integer type
A recent R devel NEWS item: approx(), spline(), splinefun() and approxfun() also work for long vectors.
In current R devel, in function 'approx1' in src/library/stats/src/approx.c and in function 'spline_eval' in src/library/stats/splines.c, in
#ifdef LONG_VECTOR_SUPPORT
there is a comment "R_xlen_t is double". It is incorrect. In Rinternals.h, in
#ifdef
2015 Jun 01
0
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
This is a great example how you cannot figure it out after spending
two hours troubleshooting, but a few minutes after you post to
R-devel, it's just jumps to you (is there a word for this other than
"impatient"?);
Let me answer my own question. The discrepancy between my sum2() code
and the internal code for base::sum() is that the latter uses LDOUBLE
= long double (on some system
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
On 10/23/19 6:45 AM, Wang Jiefei wrote:
> Hi all,
>
> I found an unexpected behavior when I was trying to use the macro defined
> in "R_ext/Itermacros.h" to loop over an atomic vector. Here is a minimum
> example:
>
> C++ code
> ```
> #include "R_ext/Itermacros.h"
> #define GET_REGION_BUFSIZE 2
> //Redefine the macro since C++ is not happy with
2019 Oct 23
2
Unexpected behavior when using macro to loop over vector
Hi all,
I found an unexpected behavior when I was trying to use the macro defined
in "R_ext/Itermacros.h" to loop over an atomic vector. Here is a minimum
example:
C++ code
```
#include "R_ext/Itermacros.h"
#define GET_REGION_BUFSIZE 2
//Redefine the macro since C++ is not happy with the implicit type
conversion
#define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype,
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
Thank you, Tomas. I appreciate your help. BTW, could you also add an
explicit type conversion in " ITERATE_BY_REGION_PARTIAL" macro while you
are fixing the bug? C++ compiler does not happy with the implicit
conversion from void* to T* somehow and I have to redefine it before using
the macro.
Best,
Jiefei
On Fri, Oct 25, 2019 at 11:13 AM Tomas Kalibera <tomas.kalibera at
2009 Mar 20
2
Why does the lexical analyzer drop comments ?
It happens in the token function in gram.c:
c = SkipSpace();
if (c == '#') c = SkipComment();
and then SkipComment goes like that:
static int SkipComment(void)
{
int c;
while ((c = xxgetc()) != '\n' && c != R_EOF) ;
if (c == R_EOF) EndOfFile = 2;
return c;
}
which effectively drops comments.
Would it be possible to keep the information
2019 Sep 24
0
What is the best way to loop over an ALTREP vector?
Not sure if you're using just C++ or Rcpp for C++ access but https://purrple.cat/blog/2018/10/14/altrep-and-cpp/ has some tips on using C++ w/ALTREP.
> On Sep 23, 2019, at 3:17 PM, Wang Jiefei <szwjf08 at gmail.com> wrote:
>
> Sorry for post a lot of things, for the first part of code, I copied my C++
> iter macro by mistake(and you can see an explicit type casting). Here
2019 Oct 25
2
Unexpected behavior when using macro to loop over vector
On 10/25/19 11:01 AM, Tomas Kalibera wrote:
> On 10/23/19 6:45 AM, Wang Jiefei wrote:
>> Hi all,
>>
>> I found an unexpected behavior when I was trying to use the macro
>> defined
>> in "R_ext/Itermacros.h"? to loop over an atomic vector. Here is a
>> minimum
>> example:
>>
>> C++ code
>> ```
>> #include
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
Hi.
WISHLIST:
Regardless on console, I'd like to be able to timeout a call to
readline()/file("stdin", blocking=TRUE) via setTimeLimit.
OBSERVATION:
On Windows Rterm as well as plain R on Linux, setTimeLimit() does not
momentarily interrupt from stdin, but only after hitting RETURN. A
few examples:
timeout00 <- function() {
setTimeLimit(elapsed=5);
Sys.sleep(10);
}
2015 Jun 01
2
sum(..., na.rm=FALSE): Summing over NA_real_ values much more expensive than non-NAs for na.rm=FALSE? Hmm...
I'm observing that base::sum(x, na.rm=FALSE) for typeof(x) == "double"
is much more time consuming when there are missing values versus when
there are not. I'm observing this on both Window and Linux, but it's
quite surprising to me. Currently, my main suspect is settings in on
how R was built. The second suspect is my brain. I hope that someone
can clarify the below
2017 Jan 16
0
accelerating matrix multiply
Hi Robert,
thanks for the report and your suggestions how to make the NaN checks
faster.
Based on my experiments it seems that the "break" in the loop actually
can have positive impact on performance even in the common case when we
don't have NaNs. With gcc on linux (corei7), where isnan is inlined, the
"break" version uses a conditional jump while the