Displaying 20 results from an estimated 7000 matches similar to: "Rprintf expected encoding"
2017 Jun 11
1
translateChar in NewName in bind.c
I see another thing in function 'NewName' in bind.c. In
else if (*CHAR(tag)) ,
'ans' is basically copied from 'tag'. Could the whole thing there be just the following?
ans = tag;
It seems to me that it can also replace
ans = R_BlankString;
in 'else'; so,
else if (*CHAR(tag))
and
else
can be merged to be just
else .
--------------------------------------------
2010 Feb 22
1
shash in unique.c
Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense
to hash the pointer itself rather than the string it points to?
In other words could the SEXP pointer be cast to unsigned int and the usual
scatter be called on that as if it were integer?
shash would look like a slightly modified version of ihash like this :
static int shash(SEXP x, int indx, HashData *d)
{
2017 May 09
1
source(), parse(), and foreign UTF-8 characters
On 09.05.2017 13:19, Duncan Murdoch wrote:
> On 09/05/2017 3:42 AM, Kirill M?ller wrote:
>> Hi
>>
>>
>> I'm having trouble sourcing or parsing a UTF-8 file that contains
>> characters that are not representable in the current locale ("foreign
>> characters") on Windows. The source() function stops with an error, the
>> parse() function
2017 Aug 01
0
translateChar in NewName in bind.c
For the 2nd example, I say that R 3.4.1 result is acceptable, as names(c(x)) and names(x) are equal.
The change exposed by the 2nd example is in line with statement of the NEWS item corresponding to PR#17284: "c() and unlist() are now more efficient in constructing the names(.) of their return value, ...." However, currently, the NEWS item is for R-devel, not R 3.4.1 patched.
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.
2008 Apr 16
1
C++ complains abouct Rprintf signature
Dear R-devel,
My g++ complains about the first argument to Rprintf being non-const char *. For example when compiling the line
Rprintf("hello world\n");
the following warning is emitted:
warning: deprecated conversion from string constant to 'char*'
Is there a reason for the non-const? It is curious that Rf_error, which is similar to RPrintf, is const.
If there is a need
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 Jan 27
0
Character encodings and packages
Since R 2.5.0 it has been possible to declare the encodings of character
strings (at the level of individual elements of a character vector).
As a reminder, here is the announcement in NEWS
o R now attempts to keep track of character strings which are
known to be in Latin-1 or UTF-8 and print or plot them
appropriately in other locales. This is primarily intended
to make it possible
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
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
2017 May 09
2
source(), parse(), and foreign UTF-8 characters
Hi
I'm having trouble sourcing or parsing a UTF-8 file that contains
characters that are not representable in the current locale ("foreign
characters") on Windows. The source() function stops with an error, the
parse() function reencodes all foreign characters using the <U+xxxx>
notation. I have added a reproducible example below the message.
This seems well within the
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
>>
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 Aug 23
2
Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
Dear list,
I installed R 3.3.2 on a Red Hat Linux Enterprise 7.3 machine by adding the EPEL-repository and then installing it via yum.
R starts up and seems to be doing fine at first sight. However, when I try to list the files in a directory with the command
files <- list.files(path="/home/username/directory_name/", pattern="*.Rda",, full.names=T, recursive=FALSE)
I get
2009 Jun 16
1
Package Install "Design" fails on Ubuntu 8.04
Dear All,
I am running a Ubuntu 8.04 System and trying to install the
Design-package. Hmisc is already installed, all fortran compilers and a
Tex-Package are also on board. I searched the net and the help list for
analogue threads, but didn't find any.
Whenever I run the install.packages("Design")-Command, the following
error message shows up in the terminal window:
--
**
2017 Sep 14
2
special latin1 do not print as glyphs in current devel on windows
This is a follow-up on my initial posts regarding character encodings on
Windows (https://stat.ethz.ch/pipermail/r-devel/2017-August/074728.html)
and Patrick Perry's reply
(https://stat.ethz.ch/pipermail/r-devel/2017-August/074830.html) in
particular (thank you for the links and the bug report!). My initial
posts were quite chaotic (and partly wrong), so I am trying to clear
things up a
2011 Feb 01
1
list.files() error message: 'translateCharUTF8' must be called on a CHARSXP
I'm using list.files() on my home directory, like this:
crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE,
recursive=TRUE)
With dir.to.check set to the full path to my home directory.
After a while I get:
Error in list.files(dir.to.check, full.names = TRUE, all.files = TRUE, :
'translateCharUTF8' must be called on a CHARSXP
This happens on one of my
2007 Feb 07
3
Redirect --stats to STDERR.
Hello,
I have written a little script that's would email me all errors.
rsync -vah --delete --stats <sources> <destination> >
/var/log/sauvegarde/listoffile.log 2> /var/log/sauvegarde/errors.log
My problem is i want to have the stats in my mail. Is it possible to
redirect --stats to STDERR.
I have tryed to do this :
/---
2011 Mar 18
1
[Patch suggestion] Adding 3rd arg to tempfile() to set extension
The other day I was working on an example which used tempfile() to create
file for use by the graphics device. And while I love tempfile()---as it is
portable and clever and the files get cleaned by R and all that---I noticed
one missing feature I would like to see: beside a starting name pattern, and
an optional directory, an 'file extension' argument would be nice to have.
As e.g. in
2004 Jan 27
1
Differentiating debug messages from both sides
Some of the debug messages that rsync outputs (when verbose >= 2) can
occur on both sides of the connection. This makes it hard to know which
program is saying what. Some debug messages deal with this by
outputting a "[PID]" string at the start of the message. Unfortunately,
the startup message that tells us which pid is which is only output when
verbose >= 3, so there's a