Re: [R] on parallel processing...

2022-11-04 Thread akshay kulkarni
dear Jeff, Yeah, you are right.just went through the documentation and found out that clusterApplyLB() from parallel package does the job... Thanks again THanking you, Yours sincerely AKSHAY M KULKARNI From: Jeff Newmiller Sent:

Re: [R] on parallel processing...

2022-11-04 Thread Jeff Newmiller
You don't specify processors. Just invoke the worker functions with the relevant packages and they will be allocated according to how you defined the cluster object... typically automatically. Processors are usually specified (to the cluster object) according to IP address. Cores within the

[R] on parallel processing...

2022-11-04 Thread akshay kulkarni
Dear members, I want to send the same function with different arguments to different processors. This solution was provided in Stack Overflow https://stackoverflow.com/questions/25045998/send-function-calls-with-different-arguments-to-different-processors-in-r-using

Re: [R] data frame returned from sapply but vector expected

2022-11-04 Thread PIKAL Petr
Hallo Ivan Thanks, yes it seems to be working. I thought also removing NULL by mylist2[sapply(mylist2, is.null)] <- NULL but your approach is probably better (in any case simpler) Thanks again. Petr > -Original Message- > From: Ivan Krylov > Sent: Friday, November 4, 2022 1:37 PM >

Re: [R] data frame returned from sapply but vector expected

2022-11-04 Thread Ivan Krylov
On Fri, 4 Nov 2022 15:30:27 +0300 Ivan Krylov wrote: > sapply(mylist2, `[[`, 'b') Wait, that would simplify the return value into a matrix when there are no NULLs. But lapply(mylist2, `[[`, 'b') should work in both cases, which in my opinion goes to show the dangers of using simplifying

Re: [R] data frame returned from sapply but vector expected

2022-11-04 Thread Ivan Krylov
On Fri, 4 Nov 2022 12:19:09 + PIKAL Petr wrote: > > str(sapply(mylist2, "[", "b")) > > List of 3 > > $ : NULL > > $ :'data.frame': 5 obs. of 1 variable: > > ..$ b: num [1:5] 0.01733 0.46055 0.19421 0.11609 0.00789 > > $ :'data.frame': 5 obs. of 1 variable: > > ..$

[R] data frame returned from sapply but vector expected

2022-11-04 Thread PIKAL Petr
Hallo all I found a strange problem for coding if part of list is NULL. In this case, sapply result is ***list of data frames*** but if there is no NULL leaf, the result is ***list of vectors***. I tried simplify option but it did not help me neither I found anything in help page. The

Re: [R] Associate a .R file with the RGui

2022-11-04 Thread PIKAL Petr
Hi another option is to use SendTo folder. This was easy to find in older Windows versions. Now the easiest way is: Press the Windows Key + R to trigger the Run window. At the Open field in the window, type shell:SendTo and then click OK And SendTo folder should open. You can then add link to

Re: [R] Associate a .R file with the RGui

2022-11-04 Thread Andrew Simmons
In an R session, run this: writeLines(normalizePath(R.home("bin"))) Right click your .R file > Open with > Choose another app > Check the box "Always use this app to open .R files" > Look for another app on this PC Paste the directory found above, then select "Rgui.exe" On Fri, Nov 4, 2022,

[R] Associate a .R file with the RGui

2022-11-04 Thread Amarjit Chandhial via R-help
Hi, My OS is Windows 11 Pro 64-Bit, I have R 4.2.2 and RStudio installed. If I double-click on a .R file in File Explorer the OS gives me the option of opening the .R in RStudio, or Look for an app in the Microsoft Store, or More Apps. Similarly with a right-click. I would like to

Re: [R] R-package imputeTS / warning messages

2022-11-04 Thread Ivan Krylov
Dear Paulo Barata, On Wed, 26 Oct 2022 11:27:54 -0300 Paulo Barata wrote: > In stats::StructTS(data, ...) : >possible convergence problem: 'optim' gave code = 52 and message > ‘ERROR: ABNORMAL_TERMINATION_IN_LNSRCH’ > > The function StructTS is called by the function na_kalman of the >