similar to: Parallel assignments and goto

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

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 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 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 14
0
Parallel assignments and goto
Dear Thomas, This looks like a really interesting project, and I don't think that anyone responded to your message, though I may be mistaken. I took at a look at implementing parallel assignment, and came up with: passign <- function(..., envir=parent.frame()){ exprs <- list(...) vars <- names(exprs) exprs <- lapply(exprs, FUN=eval, envir=envir) for (i in
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 >
2017 Aug 04
4
define a list with names as variables
Hello, I'm having troubles defining a list where names are variables (of type character). Like this, which gives "foo" instead of "world" (the way I meant it is that "world" is the value of the variable foo). Any hint? > f <- function(foo, bar) { list(foo = bar) } > x <- f("hello", "world") > names(x) [1] "foo"
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
2009 Jul 03
1
Plot Fonts in Windows vs Mac OSX
I have been plotting the same charts using png on a Windows machine and on a Mac OSX and the quality of the resulting images, particularly in relation to the fonts, look far superior in the plots produced on the Mac. Is there any way I can enhance the quality of the plots produced on the Windows machine? I have also tried using win.metafile on the Windows machine and the quality looks the same as
2008 Mar 30
2
callCC in 2.7.0
Would anyone like to explain if callCC in R 2.7.0 gives anything that on.exit does not already provide? It seems that the exit condition once defined cannot be added to overridden whereas with on.exit multiple on.exit's add additional on.exits rather than being ignored. Is this important?
2020 Mar 17
3
new bquote feature splice does not address a common LISP @ use case?
Dear R-devel, There is a new feature in R-devel, which explicitly refers to LISP @ operator for splicing. > The backquote function bquote() has a new argument splice to enable splicing a computed list of values into an expression, like ,@ in LISP's backquote. Although the most upvoted SO question asking for exactly LISP's @ functionality in R doesn't seems to be addressed by this
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
2015 Nov 03
26
[Bug 11588] New: missing option: preallocate for all files except for sparse
https://bugzilla.samba.org/show_bug.cgi?id=11588 Bug ID: 11588 Summary: missing option: preallocate for all files except for sparse Product: rsync Version: 3.1.2 Hardware: x64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: core
2020 May 11
4
library ggplot2, swirl, car, lattice. No consigo abrir bibliotecas
Buenas tardes, No consigo abrir librerias con el comando >library("ggplot2") una vez instalados packages en el R-Studio. El programa me reporta lo siguiente: Error: package or namespace load failed for ?ggplot2? in get(Info[i, 1], envir = env): no fue posible abrir el archivo 'C:/Users/David Menchén/Documents/R/win-library/4.0/rlang/R/rlang.rdb': No such file or
2019 Nov 11
2
R en Jupyter Lab, error al cargar dplyr: "namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.0 is required"
Hola Quiero ejecutar R desde Jupyter Lab y me encuentro con un error al invocar la librería dplyr. Este error no aparece cuando ejecuto RStudio. La sesión de R en jupyter lab: sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) Matrix products: default locale: [1] LC_COLLATE=Spanish_Chile.1252
2008 Mar 01
5
rspec with continuations: very strange
I appear to have written code which travels backwards through time: http://www.vimeo.com/742590 This disturbs me immensely. If anyone can explain it, that would be cool. I think it''s an illusion brought about by how RSpec wraps the code it executes, and by the sheer weirdness of continuations. -- Giles Bowkett Blog: http://gilesbowkett.blogspot.com Portfolio:
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
2018 Mar 13
5
Learning advanced R
Hello: Could you please suggest the best way to become an "advanced" R programmer. I went through "R for dummies" by de Vries and Meys and I can see two ways to proceed: 1) Get a more advanced textbook. E.g. could you recommend Gentleman, "R for Bioinformatics"? 2) Because textbooks are limited and become obsolete fast, I can focus on learning state-of-the-art
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.,