similar to: as.pairlist does not convert call objects

Displaying 20 results from an estimated 8000 matches similar to: "as.pairlist does not convert call objects"

2018 Mar 18
3
`@<-` modify its argument when slot is externalptr
Dear all, I am confused about the inconsistent behaviors of `@<-` operator when used in different ways. Consider the following example: library(inline) # Function to generate an externalptr object with random address new_extptr <- cfunction(c(), ' SEXP val = PROTECT(ScalarLogical(1)); SEXP out = PROTECT(R_MakeExternalPtr(&val, R_NilValue, val)); UNPROTECT(2);
2018 Mar 18
0
`@<-` modify its argument when slot is externalptr
On Sun, 18 Mar 2018, Jialin Ma wrote: > Dear all, > > I am confused about the inconsistent behaviors of `@<-` operator when > used in different ways. Consider the following example: > > library(inline) > > # Function to generate an externalptr object with random address > new_extptr <- cfunction(c(), ' > SEXP val = PROTECT(ScalarLogical(1)); >
2017 Apr 30
1
`match.call` and dots substitution
I'm noticing some interesting behavior in `match.call` in some corner-ish cases that arise when you try to use `match.call` to match a "grandparent" function and there are dots involved: fun0 <- function(a, ...) fun1(...) fun1 <- function(b, ...) fun2() fun2 <- function() match.call( fun1, sys.call(sys.parent()), expand.dots=FALSE,
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
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
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
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
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 > >
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
2010 Dec 11
1
'identical' and the warning "ignoring non-pairlist attributes"
Dear R developers Using the 'foreach' package I encounter warnings like Warning message: In identical(.combine, cbind) : ignoring non-pairlist attributes Warnings appear once in a new R-session when I run a particular piece of code - and not again. I understand from the source code of 'identical' that the function checks and believes that .combine and cbind have non-pairlist
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
2009 Nov 21
1
How to make a cartesian pairlist from a vector?
Hi, I'm looking for a function that will take a list of columns or data.frame and corvert it to cartesian pairlist. For example for this data.frame (see below), I'd like to get a list of all possible pairs: > sound cs rs ns 7 5 2 4 5 4 6 3 1 8 4 1 6 4 2 6 7 1 2 2 5 9 2 5 how can I get this? > mylist ((cs,rs), (cs,ns), (rs,ns))
2018 Aug 31
2
svg ignores cex.axis in R3.5.1 on macOS
????? Plots produced using svg in R 3.5.1 under macOS 10.13.6 ignores cex.axis=2.? Consider the following: > plot(1:2, cex.axis=2) > svg('svg_ignores_cex.axis.svg') > plot(1:2, cex.axis=2) > dev.off() > sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS:
2018 Sep 05
2
svg ignores cex.axis in R3.5.1 on macOS
Seems ok on my system. Axis label size changes when cex.axis does. ## tested in the middle of another long session, so many additional packages are attached, including some personal packages not available elsewhere > sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.6 Matrix products: default BLAS:
2017 May 02
1
R 3.4 and mclapply assertion failure - is this a bug?
Dear all,? I am not sure if this is a bug, so I prefer to post it here before filing. After upgrading to 3.4 I encounter the following message with mclapply: Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine
2017 Jul 24
2
Loading Rcmdr
With the lastest version of R 3.4.1 I have not been able to loard Rcmdr. Advice please. Thank you, Jack Talley, PhD [[alternative HTML version deleted]]
2012 Mar 12
3
how to calculate a variance and covariance matrix for a vector
Hello, I have a vector {a, b1, b2, b3, b4}. How can I calculate the following matrix: var(a) cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) cov(a, b1) var(b1) cov(a, b2) cov(a, b3) cov(a, b4) ... ... cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) var(b4) I would very appreciate your inputs. Thank you very much. Sincerely, Jialin Huang [[alternative HTML version deleted]]
2020 Sep 11
4
Garbage collection of seemingly PROTECTed pairlist
I want to write an R function using R's C interface that takes a 2-column matrix of increasing, non-overlapping integer intervals and returns a list with those intervals plus some added intervals, such that there are no gaps. For example, it should take the matrix rbind(c(5L, 6L), c(7L, 10L), c(20L, 30L)) and return list(c(5L, 6L), c(7L, 10L), c(11L, 19L), c(20L, 30L)). Because the output is
2012 Jul 26
3
rep fails on pairlist
This code which has worked for years in R but fails under R-devel: > R.version.string [1] "R Under development (unstable) (2012-07-25 r59963)" > > n <- 3 > f <- function(x) {} > formals(f) <- rep(formals(f), n) ## Error in rep(formals(f), n) : replication of pairlists is defunct The message suggests that the change was intentional. Why was this functionality
2003 Feb 14
1
pairlists (was: data manipulation function descriptions)
> -----Original Message----- > From: Luke Tierney [mailto:luke at stat.uiowa.edu] > R does not provide a pairlist data structure. This creates a dilemma > when translating some list-based xlispstat code, or, more > importantly, when implementing an algorithm for which parilists are > the natural data structure to use. > ... > Pairlists were and still are used internally