Displaying 20 results from an estimated 1000 matches similar to: "'identical' and the warning "ignoring non-pairlist attributes""
2010 Apr 29
3
Can't load "doSMP" from REvolutionR in regular R2.11.0
Hi list,
I was testing out the "doSMP" package from REvolutionR in my regular R2.11.0 installation and I got the following error message.? Well, one obvious thing is that R2.11.0 was built using "i386-pc-mingw32" which is different from what revoIPC used.? I could just use REvolutionR, but all my R peripherals were set up to work
with the regular R2.11.0.? So, I really want
2010 Nov 16
2
Debugging segfault in foreach
Hi,
I'm using R-2.12 on a linux 64bit machine.
When I run a chunk of code inside a foreach() %do% { ...} or %dopar%
{...} (with doMC backend) I keep getting a segfault. Running the
*same* code within lapply(something, function(x) ... ) doesn't result
in any segfaults. I'll paste the output below, but I'm not sure it
would be helpful.
I'm more curious how to go about smoking
2010 Sep 16
1
The permutation of one vector into another
Dear R-help-list
I have two character vectors
a <- c("A", "B", "C")
b <- c("A", "C", "B")
Then
sapply(a, function(i) grep(i, b))
computes the permutation of the entries in 'b' needed
to bring 'b' into the same order as 'a'.
I have searched around, but haven't been able to find
any existing function
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
Hi, I seem to not be able to assign NULL to an element of a pairlist
without causing it to be coerced to a plain list. For example:
> x <- pairlist(1, 2)
> class(x)
[1] "pairlist"
> x[1] <- list(NULL)
> class(x)
[1] "list"
This actually true for all [()<- assignments regardless of list value, e.g.
> x <- pairlist(1, 2)
> x[1] <- list(0)
[1]
2016 Oct 12
0
How to assign NULL value to pairlist element while keeping it a pairlist?
Michael, thanks for this info.
I've stumbled upon this in a case where I walk an R expression (the
AST) and (optionally) modifies it (part of the globals package). In R
expressions, a function definition uses a pairlist to represent the
arguments. For example,
> expr <- quote(function(x = 1) x)
> str(as.list(expr))
List of 4
$ : symbol function
$ :Dotted pair list of 1
..$ x:
2016 Oct 12
0
How to assign NULL value to pairlist element while keeping it a pairlist?
The coercion is probably the most viable workaround for now, as it's
consistent with what happens internally for calls. All pairlists/calls
are converted to list for subassignment, but only calls are converted
back. My guess is that the intent was for users to move from using a
pairlist to the "new" (almost 20 years ago) list. In my opinion,
consistency trumps "convenience"
2016 Oct 15
0
How to assign NULL value to pairlist element while keeping it a pairlist?
>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>> on Wed, 12 Oct 2016 15:21:13 -0700 writes:
> Thanks, this was what I expected. There is a desire to
> eliminate the usage of pairlist from user code, which
> suggests the alternative of allowing for function
> arguments to be stored in lists. That's a much deeper
2016 Oct 19
0
How to assign NULL value to pairlist element while keeping it a pairlist?
On Wed, 19 Oct 2016, Henrik Bengtsson wrote:
> On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler
> <maechler at stat.math.ethz.ch> wrote:
>>>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>>>> on Wed, 12 Oct 2016 15:21:13 -0700 writes:
>>
>> > Thanks, this was what I expected. There is a desire to
>>
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
Hi Henrik,
It would help to understand your use case for pairlists.
Thanks,
Michael
On Wed, Oct 12, 2016 at 9:40 AM, Michael Lawrence <michafla at gene.com> wrote:
> The coercion is probably the most viable workaround for now, as it's
> consistent with what happens internally for calls. All pairlists/calls
> are converted to list for subassignment, but only calls are
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
2010 Nov 19
0
Error from sparse pattern matrix product
Hi
The following attempt to minimize memory consumption fails.
m1 <- Matrix(c(rep(1,1000), rep(0,2000)), 1500)
m2 <- as(m1, "ngCMatrix")
Then
m1 %*% c(1,2)
produces the desired matrix product, while
m2 %*% c(1,2)
results in the error
Error in x %*% y :
Cholmod error 'invalid xtype' at file:../MatrixOps/cholmod_sdmult.c, line 82
I might be making a wrong
2010 Dec 17
0
How to use the RUnit tracker in unit tests?
R-developers
Does anybody know how I incorporate the use of the tracker in RUnit
in the unit tests?
I have read the RUnit Vignette, help pages and searched around,
but I could find no examples of using 'inspect' in the unit
test functions. Moreover, doing so, I tried something like
library(RUnit)
myFunction <- function(x) {
return(x)
}
track <- tracker()
track$init()
2010 Sep 03
1
'seq' help page: seq_length -> seq_len?
In the Value section of the 'seq' help page it says
'seq_along' and 'seq_length' always return an integer vector.
I believe it should be
'seq_along' and 'seq_len' always return an integer vector.
as there are no seq_length function?
Best, Niels
--
Niels Richard Hansen Web: www.math.ku.dk/~richard
Associate Professor
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
Thanks, this was what I expected. There is a desire to eliminate the
usage of pairlist from user code, which suggests the alternative of
allowing for function arguments to be stored in lists. That's a much
deeper change though.
On Wed, Oct 12, 2016 at 12:31 PM, Henrik Bengtsson
<henrik.bengtsson at gmail.com> wrote:
> Michael, thanks for this info.
>
> I've stumbled upon
2010 Sep 30
1
Assignment to a slot in an S4 object in a list seems to violate copy rules?
Dear R-developers
I came across the following issue, which I find strange:
setClass("A", representation(a = "numeric"))
B <- list()
myA <- new("A", a = 1)
B$otherA <- myA
B$otherA at a <- 2
myA at a
Assigning a new value to slot 'a' in the _copy_ of myA stored
in B$otherA changes the original value of myA -- this was
surprising to me, and I
2018 Mar 28
1
as.pairlist does not convert call objects
Dear all,
It seems that as.pairlist does not convert call objects, producing
results like the following:
> is.pairlist(as.pairlist(quote(x + y)))
[1] FALSE
Should this behavior be expected?
Thanks,
Jialin
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Tumbleweed
Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
2007 Oct 02
2
pairlist objects
Hi,
?pairlist gives no explanation about what exactly is the difference
between a pairlist and a list (except that a pairlist of length 0
is 'NULL'). So, what's a pairlist?
class(.Options)
[1] "pairlist"
Some strange things about the "pairlist" type:
> showClass("pairlist")
Error in getClass(Class) : "pairlist" is not a defined class
2006 Aug 29
1
list and pairlist in "Writing R Extensions" (PR#9185)
Full_Name: Glen Herrmannsfeldt
Version: 2.2.1
OS: Linux
Submission from: (NULL) (128.95.113.77)
Following the discussion in "Writing R Extensions" in section 5.8.2, there
is no indication that showArgs expects a pairlist() instead of a list().
I was trying
.Call("showArgs",list(one=1,two=2,three=3))
for example, and getting many core dumps.
It wasn't until reading
1999 Jan 21
1
Pairlist & Dataframe
Is this a feature/bug or am I missing something:
R : Copyright 1999, The R Development Core Team
Version 0.63.2 (January 12, 1999)
......
> ls()
character(0)
> x <- NULL
> x$x1 <- rnorm(10)
> x$x2 <- rnorm(10)
> mode(x)
[1] "pairlist"
> as.data.frame(x)
Error: can't coerce pairlist into a
2016 Oct 19
2
How to assign NULL value to pairlist element while keeping it a pairlist?
On Sat, Oct 15, 2016 at 2:00 AM, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>>> on Wed, 12 Oct 2016 15:21:13 -0700 writes:
>
> > Thanks, this was what I expected. There is a desire to
> > eliminate the usage of pairlist from user code, which
> >