[R] constructing a matrix for rgl plots

2025-05-31 Thread ravi via R-help
Hi, rgl plots seem to require the z object in the form of a matrix. I would like some help in constructing this matrix when I cannot use the outer function. Let me explain. library(rgl) library(plot3D) x <- 1:10 y <- 1:20 fun1 <- function (x,y) {x^2+y^2} z <- outer(x,y, fun1) open3d() surface3d(x

Re: [R] customizing library locations for R in ubuntu

2025-05-15 Thread ravi via R-help
I have now followed your advice and switched to the R-sig-debian help list. Ravi On Thursday, 15 May 2025 at 12:59:05 CEST, ravi wrote: I did some googling and then ran: > bspm::shadowed_packages() Package LibPath Version   Shadow.LibPath Shadow.Version Shadow.Newer bsp

Re: [R] customizing library locations for R in ubuntu

2025-05-15 Thread ravi via R-help
I did some googling and then ran: > bspm::shadowed_packages() Package LibPath Version   Shadow.LibPath Shadow.Version Shadow.Newer bspmbspm /usr/lib/R/site-library   0.5.7 /home/ravi/rvi/Rlib  0.5.7     FALSE I have a copy of bspm in the /usr/lib/R/site-li

Re: [R] customizing library locations for R in ubuntu

2025-05-14 Thread ravi via R-help
Thanks to Jeff and Ivan for your helpful comments. Ravi On Saturday, 10 May 2025 at 11:37:29 CEST, Ivan Krylov wrote: В Thu, 8 May 2025 19:39:40 + (UTC) ravi via R-help пишет: > In windows, I add the following line: > .libPaths(c(“C:/Rownlib”,”C:/R/R-4.5.0/library”)) >    

[R] customizing library locations for R in ubuntu

2025-05-08 Thread ravi via R-help
Hi, In Windows, I follow a method with customized library locations that has worked for me when upgrading to new R versions.  I have not been able to follow the same method in Ubuntu. I would like to have help. Let me explain. In windows, I add the following line: .libPaths(c(“C:/Rownlib”,”C:/R/R

Re: [R] vectorizing the integrate function

2019-08-12 Thread ravi via R-help
9 at 19:20, ravi via R-help wrote: > > Hi all,I am having some difficulties in vectorizing the integrate function. > Let me explain with an example. > a <- 10; b <- 3; c <- 4 > f <- function(x) {exp(-a*x^3-b*x^2-c*x)} > integrate(f,0,Inf) # works fine > >

Re: [R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
_along(a)){    res_i <- res[[i]]    for(j in seq_along(b)){      res_i_j <- res_i[[j]]      for(k in seq_along(m)){        r[i, j, k] <- res_i_j[[k]]$value        r.error[i, j, k] <- res_i_j[[k]]$abs.error      }    } } Hope this helps, Rui Barradas Às 21:14 de 10/08/19, ravi via R-help escreve

Re: [R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
  Expression  Cheers,Bert 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 Sat, Aug 10, 2019 at 10:20 AM ravi via R-help wrote: Hi all,I am

Re: [R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
  "OK"         "OK"        "OK"         "OK"         "OK"         call         Expression   Expression   Expression  Expression   Expression   Expression  Cheers,Bert Bert Gunter "The trouble with having an open mind is that people keep coming along a

[R] vectorizing the integrate function

2019-08-10 Thread ravi via R-help
Hi all,I am having some difficulties in vectorizing the integrate function. Let me explain with an example. a <- 10; b <- 3; c <- 4 f <- function(x) {exp(-a*x^3-b*x^2-c*x)} integrate(f,0,Inf) # works fine My difficulties start when I want to vectorize. # attempts to vectorize fail a <- seq(from=

Re: [R] Accessing C source files

2019-08-05 Thread ravi via R-help
5, 2019 6:18:14 AM PDT, ravi via R-help wrote: >Hi all,On looking at the source code for the integrate function, I find >that it has the following call: >wk <- .External(C_call_dqagi, ff, rho = environment(),             >as.double(bound), inf, as.double(abs.tol), as.double(rel.tol), 

Re: [R] Accessing C source files

2019-08-05 Thread ravi via R-help
5, 2019 6:18:14 AM PDT, ravi via R-help wrote: >Hi all,On looking at the source code for the integrate function, I find >that it has the following call: >wk <- .External(C_call_dqagi, ff, rho = environment(),             >as.double(bound), inf, as.double(abs.tol), as.double(rel.tol), 

[R] Accessing C source files

2019-08-05 Thread ravi via R-help
Hi all,On looking at the source code for the integrate function, I find that it has the following call: wk <- .External(C_call_dqagi, ff, rho = environment(),             as.double(bound), inf, as.double(abs.tol), as.double(rel.tol),             limit = limit)How do I access the source code for

Re: [R] plotting an isosurface on a 3d plot

2019-06-17 Thread ravi via R-help
d command? That's a material property, so you can just put it in as part of the dots.  For the meshes, it would go into the shade3d() call in the same way, or the material argument to qmesh3d. Duncan Murdoch > > Once again, I would like to thank you for your fantastic help. > Th

Re: [R] plotting an isosurface on a 3d plot

2019-06-14 Thread ravi via R-help
add an alpha value to the quad3d command? Once again, I would like to thank you for your fantastic help.Thanking you,Ravi On Thursday, 13 June 2019, 22:52:07 CEST, Duncan Murdoch wrote: On 13/06/2019 4:32 p.m., Duncan Murdoch wrote: > On 13/06/2019 12:47 p.m., ravi via R-help wr

[R] plotting an isosurface on a 3d plot

2019-06-13 Thread ravi via R-help
Hi,I want to plot a surface joining a circle on a plane with another circle (a little offset w.r.t. the first one) on a parallel plane. This is a very simplified version of my problem. I will explain with the following code : # First, I plot the two circlesorig1 <- 0.4;radius1=0.3;theta <- seq(0