igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] R: Export the operator '%--%' for use with 'foreach'


From: Chris Watson
Subject: Re: [igraph] R: Export the operator '%--%' for use with 'foreach'
Date: Mon, 14 Dec 2015 18:32:47 -0500

Yes, I tried that. It works without issue on Linux, but I see the same error message on a Windows machine. The line is specifically:

x[vs] <- foreach (i=seq_along(vs), .combine='c', export="%--%") %dopar% {

The "export" argument is not needed on Linux.

(This isn't a priority for me as I found a workaround using slightly different code)
Chris

On Sun, Dec 13, 2015 at 6:27 PM, Gábor Csárdi <address@hidden> wrote:
Did you try just supplying it as a string? This works in R in general:

"%foo%" <- function(a, b) a + b
21 %foo% 21
#> [1] 42

Gabor

On Sat, Dec 12, 2015 at 12:20 AM, Chris Watson <address@hidden> wrote:
> Hello,
>
> I've been trying to get some code working on a Windows machine. I believe
> when I use 'foreach', in a specific function it is having trouble with the
> '%--%' operator (as there are no other igraph functions in that loop). The
> error message I get is:
>
> "Error in { : task 1 failed - "object '.igraph.from' not found"
>
> Is there an alias or something like that, so I can use for the ".export"
> argument in the foreach loop? It only accepts a character vector, and
> backticks don't seem to do the trick.
>
> Thanks,
> Chris
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]