Re: [R] FW: problem with markov random field smooths in mgcv

2020-03-24 Thread Simon Wood
Hi Chris, It's kind of a documentation glitch, a node is not supposed to be listed as its own neighbour (it causes the diagonal entries in the penalty matrix to be over-written by the wrong value). i.e. the neighbour list should be.  NB <- list()     NB$'East Timor' <- c(2,15)     NB$Austral

Re: [R] 2D and 3D graphing

2020-03-24 Thread Duncan Murdoch
rgl can do that, but I have my doubts whether it is useful: x <- runif(500) y <- runif(500) z <- (x - 0.5)^2 + (y - 0.5)^2 library(rgl) plot3d(x, y, z, col = "red") dxyz <- deldir::deldir(x, y, z = z, suppressMsge = TRUE) plot3d(dxyz, add = TRUE, front = "lines", back = "lines", specular = "bla

Re: [R] 2D and 3D graphing

2020-03-24 Thread EK Esawi via R-help
Thank you Jeff. I have been using a textbook which has some of the chart types i was hoping to produce; that's 3D charts where points are connected by lines in 3D, like a grid. The book also has 3D fitted surfaces. The authors used exclusively R in this book. That's what i asked. Thanks again

Re: [R] Request for help about running a loop and reading .NC files

2020-03-24 Thread David Pierce via R-help
Hey Bhaskar, Dave Pierce here, the author and maintainer of the ncdf4 package. What platform are you working on? If you work on Linux, I'd be happy to send you a new source tar version of the ncdf4 package I've made that handles this case. It now has a settable parameter in nc_open called "return

Re: [R] Request for help about running a loop and reading .NC files

2020-03-24 Thread Bert Gunter
?tryCatch See also: https://www.r-bloggers.com/error-handling-in-r/ 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, Mar 24, 2020 at 5:13 AM Bhaskar Mitra

Re: [R] Request for help about running a loop and reading .NC files

2020-03-24 Thread Ivan Krylov
On Mon, 23 Mar 2020 16:16:42 -0700 Bhaskar Mitra wrote: > I would appreciate if anyone can suggest how can I modify >the loop, whereby the loop will continue to run by bypassing those >particular >files which it cannot read or if any particular file has an error. See ?try and ?tryCatch. With `tr

[R] Request for help about running a loop and reading .NC files

2020-03-24 Thread Bhaskar Mitra
Hello Everyone, I have written a loop which reads hundreds of .nc files and extract information from each .nc file and exports that corresponding information as a csv file. The loop works fine until it encounters a .nc file which it cannot read and the loop stops. I would appreciate if anyone c