similar to: Bug with lists and expressions

Displaying 20 results from an estimated 90000 matches similar to: "Bug with lists and expressions"

2023 Mar 12
1
Multiple Assignment built into the R Interpreter?
On 12/03/2023 6:07 a.m., Sebastian Martin Krantz wrote: > Thinking more about this, and seeing Kevins examples at > https://github.com/kevinushey/dotty > <https://github.com/kevinushey/dotty>, I think this is the most R-like > way of doing it, > with an additional benefit as it would allow to introduce the useful > data.table semantics DT[, .(a = b, c, d)] to more
2023 Mar 12
1
Multiple Assignment built into the R Interpreter?
Kevins package is very nice as a proof of concept, no doubt about that, but it is not at the level of performance or convenience that a native R implementation would offer. I would probably not use it to translate matlab routines into R packages placed on CRAN, because it?s an additional dependency, I have a performance burden in every iteration, and utils::globalVariables() is everything but
2023 Mar 13
1
Multiple Assignment built into the R Interpreter?
Dear All, As a maintainer of large, complex packages, I can think of many places in which deconstructing assignment would simplify the code, as well as facilitate readability by breaking up larger functions into helpers, so I would be very glad to see this incorporated somehow. I think the crux of the matter is that while there is a number of ways to implement deconstructing assignment within R,
2023 Mar 13
1
Multiple Assignment built into the R Interpreter?
Yes, this is really a problem with the checks, not with the language. A simpler approach than your alternativeAssignment function would be simply to allow globalVariables() to be limited to a single function as the note in its help page says. This might be tedious to write by hand, but could be automated using methods like "dotify" in dotty. Duncan Murdoch On 12/03/2023 10:36
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
On 11/03/2023 9:54 a.m., Sebastian Martin Krantz wrote: > Thanks Duncan, > > I know about list2env(), in fact a previous version of collapse::`%=%` > was coded as > > "%=%" <- function(lhs, rhs) { > ?? if(!is.character(lhs)) stop("lhs needs to be character") > ?? if(!is.list(rhs)) rhs <- as.vector(rhs, "list") > ?? if(length(lhs)
2014 Nov 24
1
Error "promise already under evaluation ..." with function(x, dim=dim(x))
On Sat, Nov 15, 2014 at 1:47 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 14/11/2014, 9:06 PM, Henrik Bengtsson wrote: > > I've meant to ask the following for several years now. I understand why: > > > >> foo <- function(x, dim=dim) { dim } > >> foo(1) > > Error in foo(1) : > > promise already under evaluation:
2023 Mar 12
2
Multiple Assignment built into the R Interpreter?
Thanks Gabriel and Kevin for your inputs, regarding your points Gabriel, I think Python and Julia do allow multiple sub-assignment, but in-line with my earlier suggestion in response to Duncan to make multiple assignment an environment-level operation (like collapse::%=% currently works), this would not be possible in R. Regarding the [a] <- coolest_function() syntax, yeah it would mean do
2008 Jul 06
2
Regular expressions: bug or misunderstanding?
I'm trying to write a gsub() call that takes a string and escapes all the unescaped quote marks in it. So the string \" would be left unchanged, but \\" would be changed to \\\" because the double backslash doesn't act as an escape for the quote, the first just escapes the second. I have the usual problems of writing regular expressions involving backslashes which
2003 Nov 26
0
Question about Unix file paths (and proposal for new regexp class)
> Date: Wed, 26 Nov 2003 13:52:44 +0100 > From: Martin Maechler <maechler@stat.math.ethz.ch> > To: <Kurt.Hornik@wu-wien.ac.at> > Cc: <r-devel@stat.math.ethz.ch> > Subject: Re: [Rd] Question about Unix file paths > > > > >>>>> " Kurt" == Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> > >>>>> on Wed, 26
2024 Jul 16
0
[ANNOUNCE] nftables 1.1.0 release
Hi! The Netfilter project proudly presents: nftables 1.1.0 ... after a release cycles of 8 months. This release contains mostly fixes, listed in no particular order: - Restore compatibility set element dump with <= 0.9.8 add element t s { 23 counter packets 10 bytes 20 timeout 10s } add element t s { 42 timeout 10s counter packets 10 bytes 20 } - Disallow ifname less than
2010 Jul 29
0
[LLVMdev] LLVM ERROR: Invalid primitive type.. Is this a bug?
> I have: > int main() > { > int i = 1; > } > in test.c. > > Then: > llvm-gcc -emit-llvm -O0 -c test.c -o test.bc -g > llc -march=cpp test.bc > gives me: > LLVM ERROR: Invalid primitive type > > This only happens when I use the "-g". Is this a bug? Yes, it is a bug. In fact LLVM from subversion from a few days ago crashes even without
2019 Mar 07
0
stopifnot
By not using 'withCallingHandler' or 'tryCatch', the state is like 'stopifnot' in R 3.4.x. If 'stopifnot' becomes faster than in R 3.4.x when the expressions given to 'stopifnot' are all TRUE, it is because 'match.call' is not called. Credit is to https://github.com/HenrikBengtsson/Wishlist-for-R/issues/70 for the idea. Speaking about
2024 Apr 05
3
Bug in out-of-bounds assignment of list object to expression() vector
There seems to be a bug in out-of-bounds assignment of list objects to an expression() vector. Tested on release and devel. (Many thanks to folks over at Mastodon for the help narrowing down this bug) When assigning a list into an existing index, it correctly errors on incompatible type, and the expression vector is unchanged: ``` x <- expression(a,b,c) x[[3]] <- list() # Error x #>
2018 May 04
0
length of `...`
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Thu, 3 May 2018 08:55:20 -0700 writes: > Hi, > It would be great if one of the experts could comment on the > difference between Hadley's dotlength and ...length? The fact > that someone bothered to implement a new primitive for that > when there seems to be a very
2002 Dec 04
0
Re: Mailman password for R-help (and R-*) mailing lists?
I'm forwarding this to R-help since it might be of wider interest. I'm glad for your mail, Duncan! >>>>> "Duncan" == Duncan Murdoch <dmurdoch at pair.com> >>>>> on Wed, 04 Dec 2002 06:55:09 -0500 writes: Duncan> Hi Martin. I don't think my mailman password was Duncan> mailed to me. Indeed, it wasn't. I was wrong
2024 Mar 01
1
capture "->"
Adrian, That is indeed a specialized need albeit not necessarily one that cannot be done by requiring an alternate way of typing a formula that avoids being something the parser sees as needed to do at that level. In this case, my other questions become moot as I assume the global assignment operator and somethings like assign(?xyz?, 5) will not be in the way. What I was wondering about is
2007 Nov 27
2
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
On Nov 26, 2007, at 23:40, Chris Lattner wrote: > On Nov 26, 2007, at 11:30 AM, Gordon Henriksen wrote: > >> >> 1. The ocaml exception model is quite unique; emulating it seems >> unlikely. DWARF exceptions are a suitable but incompatible >> replacement. > > Can you explain how the ocaml exception model works? Sure. With ocamlopt's model, try has cost
2023 Mar 11
1
Multiple Assignment built into the R Interpreter?
On 11/03/2023 4:42 p.m., Sebastian Martin Krantz wrote: > Thanks Duncan and Ivan for the careful thoughts. I'm not sure I can > follow all aspects you raised, but to give my limited take on a few: > >> your proposal violates a very basic property of the language, i.e. that all statements are expressions and have a value. > What's the value of 1 + (A, C =
2003 Feb 23
0
unsubscribe
From:r-devel-admin@stat.math.ethz.ch on 02/22/2003 12:00 PM CET Sent by: r-devel-admin@stat.math.ethz.ch Please respond to r-devel@stat.math.ethz.ch To: r-devel@stat.math.ethz.ch cc: (bcc: Asheka Rahman/arahma1/LSU) Subject: R-devel digest, Vol 1 #101 - 10 msgs Send R-devel mailing list submissions to r-devel@stat.math.ethz.ch To subscribe or unsubscribe via the World Wide Web,
2016 Oct 29
1
Problems with Inline ASM expressions generated in the back end
Hello. I generated in the back end by hand (in C++ code, not with TableGen) some fancy assembly code using Inline ASM expressions and if I use 2 functions in my source code (but NOT just 1 function; I will not present the functions, but each requires me to generate an Inline ASM expression) I get this error at compilation (at scheduling): BB#0: derived from LLVM BB %entry