[R] inconsistency in list subsetting in R in linux
jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Fri Jun 29 16:02:40 CEST 2018
Read the Value section of ?mclapply. That error is an encapsulated error from the forecast function.
I suggest not debugging your code running in parallel... temporarily replace mclapply with lapply to debug so you can step into your worker fictions. You may also want to temporarily reduce the volume of data you are working with.
On June 29, 2018 4:19:40 AM PDT, akshay kulkarni <akshay_e4 using hotmail.com> wrote:
>I am using GNU R(R in linux CLI). I am trying to debug a function
>called "grand.finalelPf". In the function the following line appears
>> yhpf2 <- mclapply(LYG2[-w], fun = forecast, h = 1)
>I execute the above line in browse prompt. I then type the
>Browse > length(yhpf2)
>It also is getting executed with the following output:
>But when I type this:
>Browse > yhpf2[]
>the ouput is this:
> "Error in lapply(X = S, FUN = FUN, ...) : \n argument \"FUN\" is
>missing, with no default\n"
><simpleError in lapply(X = S, FUN = FUN, ...): argument "FUN" is
>missing, with no default>
>why is this getting outputted instead of a value? Even if all the
>yhpf's are NULL, the above is output is weird.
>What is wrong? Why would the output relate to lapply? If the culprit
>was mclapply, then why does the line get executed without an error
>message? The same function is working perfectly well in windows(I used
>parLapply instead of mclapply).
>Is this peculiar to R on Linux? Please help....
>very many thanks for your time and effort,
>AKSHAY M KULKARNI
> [[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.
Sent from my phone. Please excuse my brevity.
More information about the R-help