Displaying 20 results from an estimated 5000 matches similar to: "Unstable reproduce for potential issue with CHARSXP creation"
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
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
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 <-
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
2009 Oct 01
1
Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP
Hello,
I have list of 600K lists, each sublist a list of two elements, the
first a character, the second a list of six named elements, some
characters some numrics.
LISTA (600K) (:= h)
|__ List of two elements
|__ Character
|__ Named List of 6 elements (characters and numerics)
This works,
sip <- lapply(h,function(r) r[[2]][['sip']])
but I wish to unlist this
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
2014 Mar 17
1
Deep copy of factor levels?
Hi
It seems that selecting an element of a factor will copy its levels
(Ubuntu 13.04, R 3.0.2). Below is the output of a script that creates a
factor with 10000 elements and then calls as.list() on it. The new
object seems to use more than 700 MB, and inspection of the levels of
the individual elements of the list suggest that they are distinct objects.
Perhaps some performance gain could
2019 May 10
2
ALTREP: Design concept of alternative string
Hi Gabriel,
Thanks for your explanation, I totally understand that it is almost
impossible to change the data structure of STRSXP. However, what I'm
proposing is not about changing the internal representation, but rather
about how we design and use the ALTREP API.
I might do not state the workarounds clearly as English is not my first
language. Please let me explain them again in detail.
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())
2019 May 08
2
ALTREP: Design concept of alternative string
Hello from Bioconductor,
I'm developing a package to share R objects across clusters using boost
library. The concept is similar to mmap package:
https://cran.r-project.org/web/packages/mmap/index.html . However, I have a
problem when I was trying to write Dataptr_method for the alternative
string.
Based on my understanding, the return value of the Dataptr_method function
should be a vector
2019 Jul 17
2
ALTREP wrappers and factors
Hello,
I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function.
I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the
2002 Oct 14
1
R 1.6.0 Solaris crash with xmalloc: out of virtual memory
[some de-capitalization of *SXP done manually by mailing
list maintainer ; the originally was caught as potential spam. MM]
I have a little R program that crashes with the message
xmalloc: out of virtual memory
The code has a repeat{} loop that watches the sizes of some files.
When there's an increase it updates things by reading the last 65
lines of each file, doing some
2019 Jul 19
2
ALTREP wrappers and factors
Hi Jiefei and Kylie,
Great to see people engaging with the ALTREP framework and identifying
places we may need more tooling. Comments inline.
On Thu, Jul 18, 2019 at 12:22 PM King Jiefei <szwjf08 at gmail.com> wrote:
>
> If that is the case and you are 100% sure the reference number should be 1
> for your variable *y*, my solution is to call *SET_NAMED *in C++ to reset
> the
2010 Mar 07
1
duplicate STRSXP : shallow copy ?
Hello,
As this little program illustrates, duplicating a STRSXP does not seem
deep enough.
require( inline )
fx <- cfunction( signature( x = "character"), '
SEXP y = PROTECT( duplicate( x ) );
int n = LENGTH(x);
int nc = 0 ;
char* p = 0 ;
for( int i=0; i<n; i++){
p = (char*)( CHAR( STRING_ELT( y , i ) ) );
nc = strlen( p ) ;
for( int j=0; j<nc; j++){
p[j] =
2017 Feb 20
1
another fix for R crashes under enable-strict-barrier, lto, trunk@72156
On 2nd thought, I think a better fix to the segfault is something like this:
--- a/src/main/memory.c
+++ b/src/main/memory.c
@@ -3444,6 +3444,8 @@ R_xlen_t (XTRUELENGTH)(SEXP x) { return XTRUELENGTH(CHK2(x)); }
int (IS_LONG_VEC)(SEXP x) { return IS_LONG_VEC(CHK2(x)); }
const char *(R_CHAR)(SEXP x) {
+ if(!x)
+ error("de-referncing null. Check the validity of your data.");
2017 Feb 11
1
another fix for R crashes under enable-strict-barrier, lto, trunk@72156
I haven' t touched R for some 18 months, and so I have no idea if this is a recent problems or not; but it certainly did not segfault two years ago.
Since it has been crashing (segfault) under 'make check-all' for over a month, I reckon I'll have to look at it myself, to have it fixed.
I have been having the ' --enable-memory-profiling --enable-strict-barrier
2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to
me. The following program segfaults at the second call to Rf_PrintValue().
To failure depends on the value of the y-string. E.g., if I change it from
"coverage" to, say, "COVERAGE", the segfault does not occur.
/* bug.c */
#include <stdio.h>
#include <Rinternals.h>
#include
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
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
2007 Feb 20
2
Problem with types on 64-bit
Hi Everyone,
I have a problem using some working 32-bit R code with 64-bit machine ( I am
using version R-2.4.1 ). The problem occurs when I am trying to detect a NULL
STRSXP type. ( Perhaps I am doing this detection in the wrong way? )
On 32-bit the following works, and correctly identifies if I am passing NULL
or a valid string object:
if ( v_dta_start != R_NilValue && STRING_ELT(