similar to: Parallel assignments and goto

Displaying 20 results from an estimated 600 matches similar to: "Parallel assignments and goto"

2018 Feb 11
0
Parallel assignments and goto
> On Feb 11, 2018, at 7:48 AM, Thomas Mailund <thomas.mailund at gmail.com> wrote: > > Hi guys, > > I am working on some code for automatically translating recursive functions into looping functions to implemented tail-recursion optimisations. See https://github.com/mailund/tailr > > As a toy-example, consider the factorial function > > factorial <-
2018 Feb 26
0
Parallel assignments and goto
Following up on this attempt of implementing the tail-recursion optimisation ? now that I?ve finally had the chance to look at it again ? I find that non-local return implemented with callCC doesn?t actually incur much overhead once I do it more sensibly. I haven?t found a good way to handle parallel assignments that isn?t vastly slower than simply introducing extra variables, so I am going with
2018 Feb 27
0
Parallel assignments and goto
No clue, but see ?assign perhaps if you have not done so already. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Feb 27, 2018 at 6:51 AM, Thomas Mailund <thomas.mailund at gmail.com> wrote: > Interestingly, the
2018 Feb 27
2
Parallel assignments and goto
Interestingly, the <<- operator is also a lot faster than using a namespace explicitly, and only slightly slower than using <- with local variables, see below. But, surely, both must at some point insert values in a given environment ? either the local one, for <-, or an enclosing one, for <<- ? so I guess I am asking if there is a more low-level assignment operation I can get my
2018 Feb 11
4
Parallel assignments and goto
Hi guys, I am working on some code for automatically translating recursive functions into looping functions to implemented tail-recursion optimisations. See https://github.com/mailund/tailr As a toy-example, consider the factorial function factorial <- function(n, acc = 1) { if (n <= 1) acc else factorial(n - 1, acc * n) } I can automatically translate this into the loop-version
2017 Aug 04
0
define a list with names as variables
Hello Thomas, Ulrik, thanks for your suggestions. Giovanni On Fri, Aug 4, 2017 at 12:13 PM, Thomas Mailund <thomas.mailund at gmail.com> wrote: > Do you mean like this? > > >> f <- function(foo, bar) { > + result <- list(bar) > + names(result) <- foo > + result > + } > >> (x <- f("hello", "world")) > $hello >
2020 Mar 17
0
new bquote feature splice does not address a common LISP @ use case?
Hi Jan, In the lisp code you provide the operators are parsed as simple symbols in a pairlist. In the R snippet, they are parsed as left-associative binary operators of equal precedence. If you unquote a call in the right-hand side, you're artificially bypassing the left-associativity of these operators. To achieve what you're looking for in a general way, you'll need a more precise
2017 Aug 04
1
define a list with names as variables
Do you mean like this? > f <- function(foo, bar) { + result <- list(bar) + names(result) <- foo + result + } > (x <- f("hello", "world")) $hello [1] "world" > names(x) [1] "hello" -- Thomas Mailund On 4 August 2017 at 12.08.28, Giovanni Gherdovich (g.gherdovich at gmail.com) wrote: Hello, I'm having troubles defining
2019 Jul 23
0
quiet namespace load is noisy
Hello, I think `quietly` should only silence normal masking messages intended for users and providing information about normal behaviour, such as masking. This is not the case here as the message is about overriding of S3 methods, which has global effect and is rather problematic. It may change behaviour of package and script code in unpredictable ways. This is not something that the user can
2019 Jul 23
0
[External] Re: quiet namespace load is noisy
Does setting message=FALSE in the chunk options of the vignette help? Or less preferably, using supressMessages() ? On 2019-07-23 9:36 a.m., Lenth, Russell V wrote: > Lionel, > > Thanks for your response. I understand that method overriding can be a serious issue, but as you say, this is not something that the user can act upon. Yet the message lands at the user?s feet. > >
2019 Jul 23
2
quiet namespace load is noisy
Dear R-devel, Consider the following clip (in R version 3.6.0, Windows): > requireNamespace("ggplot2", quietly = TRUE) Registered S3 methods overwritten by 'ggplot2': method from [.quosures rlang c.quosures rlang print.quosures rlang It seems to me that if one specifies 'quietly = TRUE', then messages about S3 method
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Lionel, Thanks for your response. I understand that method overriding can be a serious issue, but as you say, this is not something that the user can act upon. Yet the message lands at the user?s feet. In my case, the messages are cluttering my package vignettes, and may or may not represent what users see if they themselves run the vignette code, depending on what version of ggplot2, etc. they
2024 Feb 17
2
Capturing Function Arguments
I'm wrapping a function in R and I want to record all the arguments passed to it, including default values and missing values. I want to be able to snoop on function calls in sourced scripts as part of a unit testing framework. I can capture the values fine, but I'm having trouble evaluating them as if `force()` had been applied to each of them. Here is a minimal example: f0 <-
2008 Nov 13
2
How to fix broken ogg/theora files
>> Thanks for the suggestion. Unfortunately it did not help completely. >> When we edit the original file with oggCut and then use oggz-validate we >> get an error message like the one posted before. Now oggz-sort will fix >> the file so oggz-validate doesn't find any errors. However ffmpeg still >> produces and error with it: >> >> ffmpeg -i rlang.ogg
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Dear Russ, I had the same problem in my vignettes and setting both message and warning to FALSE seems to remove all unwanted output: ```{r message=FALSE, warning=FALSE} library("afex") library("ggplot2") library("cowplot") theme_set(theme_grey()) ``` Result: https://cran.r-project.org/web/packages/afex/vignettes/afex_plot_introduction.html Best, Henrik Am Di.,
2018 Feb 21
1
deparseDots to get names of all arguments?
On 20/02/2018 5:47 PM, Rolf Turner wrote: > On 21/02/18 11:36, Spencer Graves wrote: >> Hi, All: >> >> >> ????? How can I get the names of all the arguments in dots(...)? >> >> >> ????? I'm able to get the name of the first argument but not the second: >> >> >> >> deparseDots <- function(...){ >> ?
2019 Aug 24
0
Fwd: Document colon equals `:=` operator ?
Dear all, There was some discussion lately on twitter ( https://twitter.com/geospacedman/status/1164208293377691648 ) about the status of the colon equal operator. I'm sure it has been discussed in the past but I couldn't find anything, I'll start by clarifying all i can by myself to have strong reference, and then ask a few questions at the bottom. `:=` has been used by data table
2008 Nov 13
2
How to fix broken ogg/theora files
>> >> Examples of error messages follow: >> $ oggz-validate jnazario.ogg >> jnazario.ogg: Error: >> 00:55:27.957: serialno 0846930886: Packet out of order (previous >> 00:55:27.960) >> 01:05:09.077: serialno 0846930886: Packet out of order (previous >> 01:05:09.080) >> >> Are there any tools that can reliably fix broken Ogg/Theora files?
2017 Aug 14
0
tidyverse repeating error: "object 'rlang_mut_env_parent' not found"
The most likely explanation is you have a new version of dplyr/tibble and an old version of rlang. Try re-installing rlang. Hadley On Mon, Aug 14, 2017 at 9:26 AM, Szumiloski, John <John.Szumiloski at bms.com> wrote: > UseRs, > > When doing some data manipulations using the tidyverse, I am repeatedly getting the same error message in now three separate situations. I can write up
2019 May 30
0
R pkg install should fail for unsuccessful DLL copy on windows?
Also note that this can lead to people not being able to load the package if the set of .Call entry points has changed between the old and new versions of the package. We strongly suspect that this is what happened to this Bioconductor user: https://support.bioconductor.org/p/121228/ Note that she's installing the binary and in this case no warning is issued. All we see is: package