similar to: How to assign NULL value to pairlist element while keeping it a pairlist?

Displaying 20 results from an estimated 10000 matches similar to: "How to assign NULL value to pairlist element while keeping it a pairlist?"

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 > >
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 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
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"
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
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
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
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
2009 Mar 20
2
struggling with pairlists
I would like to create a vector of pairlist (flag, binary_value) like: (variable ="TrendOff", value = 0) (variable ="MOdwt", value = 1) (variable ? "ZeroPadding", value =1) ................................................ I tried the following syntax but the emcompassing list (that I called "flags") is not made up of pairlists. Instead it
2005 Mar 16
1
working with pairlists imported from HDF5, converting to data frames?
I've used the HDF5 library to bring some data into R. THe verbose output looks like this: > hdf5load("hdfGraphWed_Mar_16_13_33_37_2005.hdf",load=T,verbosity=1,tidy=T) Processing object: cprSeats ...... which is a Group Processing object: Seats 0 ...... its a dataset......Finished dataset Processing object: Seats 1 ...... its a dataset......Finished dataset Processing object:
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
2011 Apr 14
1
Possible bug in 'relist()' and/or 'as.relistable()'
Dear list, I think I just stumbled across a bug in either 'relist()' and/or 'as.relistable()'. It seems that 'pairlists' can only be un- and relisted as long as they're not nested: Good: a <- as.relistable(as.pairlist(list(a=1, b=2))) a <- unlist(a) relist(a)# Works Bad: a <- as.relistable(as.pairlist(list(a=1, b=2, c=list(c.1=1, c.2=2)))) a <- unlist(a)
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
2018 Feb 01
2
as.list method for by Objects
On Thu, Feb 1, 2018 at 12:14 AM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: >>>>>> Michael Lawrence <lawrence.michael at gene.com> >>>>>> on Tue, 30 Jan 2018 15:57:42 -0800 writes: > > > I just meant that the minimal contract for as.list() appears to be that it > > returns a VECSXP. To the user, we might say
2011 Nov 19
1
let's see what the app store says
"multimarkdown composer" has been out for 4 weeks now, so let's mosey on over to the app store to see what it says... "composer" is #184 in productivity apps, a bit disappointing, considering that it was in the top-20 when it first came out... it's gained only 5 reviews over the 18 it had right off the bat. perhaps even more surprising, to some, is that
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))