Displaying 7 results from an estimated 7 matches for "52.479".
Did you mean:
52.47
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
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 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
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 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
2013 Apr 22
7
Multiple lon lat points in the map with ggplot2
Hello R users,
For the last few days I am struggling with the following task:
my data.frame:
A1 A2 A3 B1 B2
B3
58.81 53.292 54.501 13.013 17.39 19.407 56.02 56.251 54.033 20.099 13.15
10.411 55.376 53.099 57.625 13.396 21.031 13.22 58.584 53.194 54.218
13.038 16.854 19.289 55.7 55.921 53.847 19.942 13.153 9.828 55.093 52.934