similar to: Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP

Displaying 20 results from an estimated 1000 matches similar to: "Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP"

2009 Nov 01
2
Internal error in 'ls' for pathological environments (PR#14035)
nchar(with(list(2),ls())) gives an internal error. This is of course a peculiar call (no names in the list), but the error is not caught cleanly. It is not clear from the documentation whether with(list(2)...) is allowable; if it is not, it should presumably give an error. If it is, then ls shouldn't have problems with the resulting environment. > qq <- with(list(2),ls())
2008 Dec 27
1
Patch to fix small bug in do_External and do_dotcall
I've stumbled upon a small bug/inconsitency in do_External and do_dotcall: Here's an example: % LC_ALL=C R --vanilla < symname-bug.R R version 2.8.0 (2008-10-20) *snip* > options(error=expression(0)) > ## Call 'R_GD_nullDevice' with incorrect parameter count: > .Call("R_GD_nullDevice", 1) Error in .Call("R_GD_nullDevice", 1) :
2009 Apr 01
2
Assignment to string
The documentation for assignment says: In all the assignment operator expressions, 'x' can be a name or an expression defining a part of an object to be replaced (e.g., 'z[[1]]'). A syntactic name does not need to be quoted, though it can be (preferably by backticks). But the implementation allows assignment to a character string (i.e. not a name), which it
2011 Dec 20
1
RODBC Error: 'getCharCE' must be called on a CHARSXP
I am trying to connect to an internal database and use the sqlQuery command to reduce and retrieve data using the following code: channel <-odbcConnect("some_dsn", uid="", pwd="") txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"' sqlQuery(channel, cat(txt,"\n"),errors=TRUE,) close(channel) However, I get the
2009 Nov 01
0
Internal error in 'ls' for pathological environments (PR#14036)
On Sun, Nov 1, 2009 at 6:02 AM, Peter Dalgaard <p.dalgaard at biostat.ku.dk> w= rote: > macrakis at alum.mit.edu wrote: >> >> nchar(with(list(2),ls())) gives an internal error. This is of course >> a peculiar call (no names in the list), but the error is not caught >> cleanly. >> >> It is not clear from the documentation whether with(list(2)...) is
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
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
2009 Sep 21
1
RODBC : using and passing queries that use " in some arguments
Dear R users, I am trying to connect R to data that is in a Access Database but I have problem with the construction of queries using special characters. I am using RODBC package. The following is working : > MyQuery<-paste("SELECT first( (DateHeure) ) , avg(NNO3_AT322_OUT_moy) AS Cond FROM Colonne_3 ") > Col3<-sqlQuery(con, query=MyQuery) > Col3
2017 Aug 23
0
Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
On 23.08.2017 12:02, Braun, Stefan wrote: > 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 <-
2014 Feb 03
1
String Vector Encoding
Hello, I was reading through serialize.c and i couldn't answer something. In readItem, case CHARSXP, rules exists to adjust the read string for string encoding. Q1. I couldn't find where the encoding of the elements of the string vector are written? Is it when writeItem writes out the attributes of the item? But i couldn't find encoding in the attributes field x <-
2016 Feb 13
1
Question about CHARSXP and garbage collection
Hi, I had a technical question about CHARSXP and garbage collection and couldn't find the answer in the R manual. The question is this. Are CHARSXP garbage collected like any other object, despite being part of the CHARSXP cache? i.e. is the cache being cleaned by garbage collection regularly and therefore, when I am in C code, do I need to protect a CHARSXP? Thanks! Holger [[alternative
2012 Feb 16
1
Unstable reproduce for potential issue with CHARSXP creation
I stumbled across one of those intermittent bugs where the code sometimes works and sometimes doesn't. Below is an example run showing a failure where a CHARSXP object was not properly created (by the sub function?). I was able to reproduce this error on three different R builds in fresh R sessions, but it sometimes takes a few start up R -> run code -> close R iterations for the
2009 Mar 18
2
incoherent conversions from/to raw
i wonder about the following examples showing incoherence in how type conversions are done in r: x = TRUE x[2] = as.raw(1) # Error in x[2] = as.raw(1) : # incompatible types (from raw to logical) in subassignment type fix it seems that there is an attempt to coerce the raw value to logical here, which fails, even though as.logical(as.raw(1)) # TRUE likewise, x[2]
2009 Mar 18
2
incoherent conversions from/to raw
i wonder about the following examples showing incoherence in how type conversions are done in r: x = TRUE x[2] = as.raw(1) # Error in x[2] = as.raw(1) : # incompatible types (from raw to logical) in subassignment type fix it seems that there is an attempt to coerce the raw value to logical here, which fails, even though as.logical(as.raw(1)) # TRUE likewise, x[2]
2018 May 14
3
Rd parser throws error for user macros invoked with empty argument
Bug or feature? I get the following error from parse_Rd() when a user Rd macro (including system ones) is invoked with empty argument {}, eg \mymacro{}: Error in tools::parse_Rd(fn) : Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'NULL' A full example is further below with the system macro \CRANpkg{}. In this example it doesn't make sense to use empty argument but
2009 Mar 20
1
sprintf causes a segfault (PR#13613)
Full_Name: Wacek Kusnierczyk Version: 2.8.0 and 2.10.0 r48163 OS: Ubuntu 8.04 Linux 32bit Submission from: (NULL) (129.241.198.172) the following code illustrates a problem with sprintf which consistently causes a segfault when applied to certain type of arguments. it also shows inconsistent consequences of the segfault: (e = tryCatch(stop(), error=identity)) # e is an error object
2018 May 25
2
Rd parser throws error for user macros invoked with empty argument
While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored: f <- tempfile() mac6 <- "\\newcommand{\\mac6}{mac6: #1}" cat(mac6, "\\mac6{2*3 2+2 sin(pi) }\n", file = f) rd <- tools::parse_Rd(f) > rd mac6: 2*3 --- Georgi Boshnakov -----Original Message----- From: Tomas Kalibera
2013 Jun 27
3
Read a text file into R with .Call()
Hi, I want to read a text file into R with .Call(). So I define some NEW_CHARACTER() to store the chracters read and use SET_STRING_ELT to fill the elements. e.g. PROTECT(qNames = NEW_CHARACTER(10000)); char *foo; // This foo holds the string I want. while(foo = readLine(FN)){ SET_STRING_ELT(qNames, i, mkChar(foo))); } In this way, I can get the desired character from qNames. The only problem
2009 Dec 10
1
Antwort: Re: Crash with Unicode and sub (PR#14114)
I don't know about the technicalities, but Peter Dalgaard said the offending code also causes R to come to a stop using SUSE + WINE. Is it possible to run that lot on top of valgrind? Of course, it will probably take all day ... If not, I have a clue which might help. The problem seems to lie in the "sub" routine. In the original report I used -- cut here -- gctorture() u <-
2004 Mar 17
1
best methods for strings and structures?
I'm trying to generate an R interface for a library that's commonly used and I'm currently writing wrapper functions for file i/o and return an object (list?) that contains the elements of the C structure. For example, reading a file that contains: struct CONFIG_RECORD { char coeffs_filename[256]; char species_filename[256]; unsigned long