[Rd] readLines() for non-blocking pipeline behaves differently in R 3.5

2018-04-25 Thread Randy Lai
It seems that the behavior of readLines() in R 3.5 has changed for non-blocking pipeline. Consider the following R script, which reads from STDIN line by line. ``` con <- file("stdin") open(con, blocking = FALSE) while (TRUE) {     txt <- readLines(con, 1)     if (length(txt) > 0) {         cat

[Rd] embeded R application on Windows prints broken character.

2018-04-26 Thread Randy Lai
The issue was reported to me for https://github.com/randy3k/rtichoke/issues/50 which is a python program which embeds R and provides a interface to R. With R 3.5, for reason which i don't understand, when I typed `"a"` in the console STDOUT got `"\x02\xff\xfea\x03\xff\xfe"` with the extra escaped

[Rd] A recent commit breaks embedded application on Windows

2018-06-17 Thread Randy Lai
A line was added to call `R_SetParams ` in the function `R_SetWin32` 4 days ago. https://github.com/wch/r-source/blob/2370eca96267e29a69396ef53a52ff5d6f60c65b/src/gnuwin32/system.c#L780 However, `R_SetParams` actually calls `R_SetWin32`. https://github.com/wch/r-source/blob/30f7698e19fe1d2ce8fe53d8

[Rd] "utils::file.edit" does not understand "editor" with additional arguments

2018-08-28 Thread Randy Lai
I am using Sublime Text as my editor. If I run `subl -n .Rprofile` in bash, a file would be opened in a new window. Back in R, if I run this > file.edit(".Rprofile", editor="'subl -n'") sh: 'subl -n': command not found Warning message: error in running command However, the interesting bit happe

[Rd] Makevars clean target not in action?

2014-03-23 Thread Randy Lai
Hi, developers When I run `R CMD INSTALL --clean my_package`, only the .o files and the .so file are removed, however, they were deleted not because of the clean target defined in Makevars. The clean target was indeed not executed. I have the following simple Marvars to show that clean target i

Re: [Rd] Error: C stack usage is too close to the limit

2014-03-29 Thread Randy Lai
I have similar experience previously. What I done was disabling stack limit checking R_CStackLimit = -1; and increasing the stack size to .16*1024*1024. Hope it helps. Randy On Mar 28, 2014, at 2:55 PM, Florian Burkart wrote: > Hi, > > I have been using my own C++ plugin for a whil