similar to: C++ complains abouct Rprintf signature

Displaying 20 results from an estimated 2000 matches similar to: "C++ complains abouct Rprintf signature"

2006 Apr 13
1
bus error on calling nmmin
Hi, I'm trying to get a toy program making use of nmmin to run successfully. I've gotten to the point of compiling. However, when I attempt to run my executable, I guess a bus error. I see that someone else has asked about using nmmin before <http://tolstoy.newcastle.edu.au/R/help/06/03/23944.html>, but I haven't come across any replies. Is there some documentation on how to
2005 Oct 17
1
RFC: API to allow identification of warnings and errors in the output stream
Dear R developers, this mail is basically a summary / clarification of some previous mails I sent to this list last week (subject "Catching warning and error output"). Duncan Murdoch pointed out that these were badly organized, and suggested I repost, collecting the main points previously spread out between several mails. Problem statement: In an application embedding R, I would
2017 Nov 21
2
Are Rprintf and REprintf thread-safe?
Is it safe to call Rprintf and REprintf from a background thread? I'm working on a package that makes calls to fprintf(stderr, ...) on a background thread when errors happen, but when I run R CMD check, it says: Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor the system RNG. Is it safe to replace these calls
2017 Nov 21
1
Are Rprintf and REprintf thread-safe?
Thanks - I'll find another way to send messages to the main thread for printing. -Winston On Tue, Nov 21, 2017 at 12:42 PM, <luke-tierney at uiowa.edu> wrote: > On Tue, 21 Nov 2017, Winston Chang wrote: > >> Is it safe to call Rprintf and REprintf from a background thread? I'm >> working on a package that makes calls to fprintf(stderr, ...) on a >>
2024 Mar 01
2
dput(..., file = stderr())
Curious to know if this warning is expected behavior, and if so, what is the recommended way instead: > dput(letters, file = stderr()) c("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
2010 Apr 05
2
Rprintf not updating
Hello all, I am using Rprintf in a C for loop (from .Call) to print a progress indicator showing the current percent complete. The loop I am doing is an time intensive call to another function. I have noticed that Rprintf does not print to the R-window until the entire loop has been completed. When it reaches the end of the loop it suddenly prints 0 percent to 100 percent in a split second.
2017 Jun 30
1
Rprintf expected encoding
I'm trying to find information about how to use Rprintf with a UTF-8 encoded string, and I'm not sure what the right cross-platform usage is. I found an earlier thread about this (http://r.789695.n4.nabble.com/How-to-print-UTF-8-encoded-strings-from-a-C-routine-to-R-s-output-td4724337.html) but it wasn't very helpful. If I want to print a UTF-8 string, I can do one of the
2006 Jun 13
1
R-2.3.1 does not install on FreeBSD 4.11-RELEASE (PR#8971)
Full_Name: Kenji Rikitake Version: 2.3.1 OS: FreeBSD 4.11-RELEASE-p18 Submission from: (NULL) (220.157.163.221) After doing ./configure --disable-mbcs (as default in FreeBSD 4.x) and make the compilation stops at src/main/printutils.c as: printutils.c: In function `Rvprintf': printutils.c:582: `va_start' used in function with fixed args printutils.c:591: syntax error before `}' the
2001 Apr 04
1
Rprintf under windows?
Hi, I've been using Rprintf from a shared library compiled under various unix flavour for a while now. I get a warning about Rprintf being undefined when constructing the library, but everything works OK after loading. I've also been cross compiling the same library using the mingw32 tools for a while now, but the inclusion of Rprintf seems to be messing up this process. It can't
2008 Apr 29
2
reproducible segmentation fault caused by textConnection()
Dear all, It seems that textConnection() can trigger a segmentation fault. The following script (using two large loops) makes this bug reproducible: for (i in 1:10000) { z=textConnection(NULL,open='w') for (j in 1:100) { write(runif(1)*1e6,file=z) write('\n',file=z) } close(z) } The bug could be reproduced on R-2.6.1, R-2.7.0 and on the latest R-devel
2008 Jun 12
1
Rprintf and "C stack usage is too close to the limit"
Hi, I would appreciate if someone could comment on this problem I am experiencing. I am writing a C++ program to be called from R. In this program, there is a verbose switch that decides whether to print some debugging info using Rprintf. On windows, things work ok. On linux, things are fine in non-verbose mode, but in verbose mode, I get error saying "C stack usage is too close to the
2008 Jul 30
1
Rprintf will not build in my C++ compiler
I have searched through the threads and "Rprintf" causing a build error dosen't seem to be a problem for anyone else. And I've read through "R Extensions" and "An Introduction to the .C Interface to R" and there doesn't seem to be any troubleshooting for my problem. My code is straight from "An Introduction to the .C Interface to R" pg. 3. And
2006 Jun 02
1
Installation R-2.3.1 on IBM AIX5.3 (PR#8931)
Full_Name: Karsten Tabelow Version: R-2.3.1 OS: AIX5.3 Submission from: (NULL) (62.141.176.2) Specification in config.site: CC=xlc_r CFLAGS='-O -qstrict' F77=xlf_r FFLAGS='-O -qstrict' SHLIB_LDFLAGS='-G' DYLIB_LDFLAGS='-G' LDFLAGS='-brtl' CXX=xlc++_r CXXFLAGS='-O -qstrict' Complilation error in src/main/printutils.c: "printutils.c",
2019 Sep 15
2
REprintf could be caught by tryCatch(message)
Dear R-devel community, There appears to be an inconsistency in R C API about the exceptions that can be raised from C code. Mapping of R C funs to corresponding R functions is as follows. error -> stop warning -> warning REprintf -> message Rprintf -> cat Rprint/cat is of course not an exception, I listed it just for completeness. The inconsistency I would like to report is
2008 Apr 03
2
g++ 4.3 warning: deprecated conversion from string constant to ‘char*’
Hello, I've noticed that with g++ 4.3 I get the following "warning: deprecated conversion from string constant to ?char*?" when I call e.g., Rprintf("Hello world"); or when I try to define a const char e.g., char lower = 'L'; I am wrapping the c++ code in extern "C" {}. This seems to be something new with g++ 4.3, because the same code compiled
2005 Oct 10
2
Catching warning and error output
Hi all, I'm working on a GUI frontend for R, and I'm looking for a good way to catch all warning- and error-output. The reason for this is mostly, that I would like to know, which sections of the output are "normal" output, warnings, and errors. This would allow for some nice features, such as highlighting warnings and errors in a different color, or popping up a message
2019 Sep 15
2
[External] REprintf could be caught by tryCatch(message)
Thank you Luke for prompt reply. Is it possible then to request a new function to R C API "message" that would equivalent to R "message" function? Similarly as we now have C "warning" and C "error" functions. Best, Jan On Sun, Sep 15, 2019 at 5:25 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > > On Sun, 15 Sep 2019, Jan Gorecki wrote:
2009 Jan 28
2
File and console output does not work in C code
Hello all, I am getting into trouble when trying to do standard I/O from a C function called within R environment. This function is written in a small C library that is loaded whith dyn.load() and called in R via the .C() interface. I need to debug the C code using a text file for some logs, and also to speed up its result visualization by creating images on the fly using the GD library. Both
2005 Dec 02
1
Printing to file from C
Hello, I am interfacing R and C code using the function .Call. Is there any way to print to file form C? I.e. is there something analogous to: fopen(file1, "w"); fprintf(file1, "%f", ... ); fclose(file1); which would not cause an error in the excution? The Writing R Extension manual does not seem to provide a lot of insights other than a vague reference to an
2007 Mar 19
3
Rinternals.h and undefined symbols
Hi, I'm trying to register my native routines using R_registerRoutines (...). I can compile the code, but the loader cannot resolve the symbol: undefined symbol: _Z18R_registerRoutinesP8_DllInfoPK12R_CMethodDefPK15R_CallMethodDefS3_S6 _ $ nm bgx.Rcheck/bgx/libs/bgx.so | grep R_registerRoutines U _Z18R_registerRoutinesP8_DllInfoPK12R_CMethodDefPK15R_CallMethodDefS3_S6