Re: [R] find number of consecutive days in NC files by R

2020-08-09 Thread Jim Lemon
Hi Ahmet, An easy way is this: library(ncdf4) soilm<-nc_open("soilw.0-10cm.gauss.1949.nc") soil_moist<-ncvar_get(soilm) smdim<-dim(soil_moist) # identify NA grid cells sm_NA_count<-matrix(NA,nrow=smdim[1],ncol=smdim[2]) for(i in 1:smdim[1]) { for(j in 1:smdim[2]) { sm_NA_count[i,j]<-sum(!is.na(

Re: [R] How Can I Build a Standalone Binary

2020-08-09 Thread Knecht, Logan
Unfortunately, that is not a solution due to the constraints of file sizes associated with the run time operations as well as specific execution workflows. I need to make this a packaged distributable and the only blocker for it at the moment is not being able to successfully bundle R as a stand

Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-09 Thread Kevin Egan
Hi Stephen, Thanks, I’m now trying to use R 3.6.3 on the HPC, I was able to run a few tests remote and get reproducible results. The batches have not yet run, but I’m hoping will give reproducible results when they do. Thanks, Kevin On Sun, Aug 9, 2020 at 08:42 stephen sefick wrote: > Hi Kevi

Re: [R] Arrange data

2020-08-09 Thread Md. Moyazzem Hossain
Dear Jim, Thanks a lot for your support. Take care. Md On Wed, Aug 5, 2020 at 1:06 PM Jim Lemon wrote: > Hi Md, > I think the errors are that you forgot to initialize "m", calculated > the mean outside the loops and forgot the final brace: > > m<-rep(0,44) > for(i in 1975:2017) { > for(j in

Re: [R] Arrange data

2020-08-09 Thread Md. Moyazzem Hossain
Dear Rui, Thank you for your nice help. Take care and be safe. Md On Tue, Aug 4, 2020 at 10:45 PM Rui Barradas wrote: > Hello, > > Please keep cc-ing the list R-help is threaded and questions and answers > might be of help to others in the future. > > As for the question, see if the following

Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-09 Thread Duncan Murdoch
On 09/08/2020 8:33 a.m., Kevin Egan wrote: Hi Abby, After running a few tests on my local and remote versions of R, this seems to be the most plausible answer to the problem. I put set.seed(123) several times within my code and produced the same results but would rather not have to do that if po

Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-09 Thread stephen sefick
Hi Kevin, I think Abby has suggested something similar to what I think the problem is related to - environment setup. Some possible solutions: The renv and packrat packages are a way to version your packages to help with reproducability. Anaconda might be a solution for the R version and package

Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-09 Thread Kevin Egan
Hi Abby, After running a few tests on my local and remote versions of R, this seems to be the most plausible answer to the problem. I put set.seed(123) several times within my code and produced the same results but would rather not have to do that if possible. On Sat, Aug 8, 2020 at 6:05 PM Abby

Re: [R] How Can I Build a Standalone Binary

2020-08-09 Thread Knecht, Logan
I believe that's what I've been doing already with the links I've provided below. One of the pieces that escapes me is that there are bundled dynamic libraries like `gfortran` that are missing from the build from source solution I'm pursuing, however they exist in the packaged artifact availabl

Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-09 Thread Kevin Egan
Local: R version 4.0.2 (2020-06-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.fram