Displaying 20 results from an estimated 3000 matches similar to: "Internal error in 'ls' for pathological environments (PR#14035)"
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
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
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
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
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
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.
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 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]
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
1997 Jul 22
7
R-alpha: New version of R for testing
The newest version of R for Unix (version 0.50 alpha-1) is now (or will
soon be) available from the following sites.
NORTH AMERICA:
http://lib.stat.cmu.edu/R/Alpha
EUROPE:
ftp://ftp.stat.math.ethz.ch/R/
ftp://statlab.uni-heidelberg.de/pub/mirrors/auckland/R/
JAPAN:
ftp://ftp.u-aizu.ac.jp/pub/lang/R/
NEW ZEALAND:
ftp://stat.auckland.ac.nz/pub/R/
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 <-
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
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
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
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] =