search for: pbruneau

Displaying 11 results from an estimated 11 matches for "pbruneau".

Did you mean: bruneau
2014 Dec 20
2
Unexplained difference between results of dppsv and dpotri LAPACK routines
Dear R contributors, Considering the following sample C code, that illustrates two possible uses of a Cholesky decomp for inverting a matrix, equally valid at least in theory: SEXP test() { int d = 2; int info = 0; double mat[4] = {2.5, 0.4, 0.4, 1.7}; double id[4] = {1.0, 0.0, 0.0, 1.0}; double lmat[3]; F77_CALL(dpotrf)("L", &d, mat, &d, &info); lmat[0] = mat[0]; lmat[1]
2014 Dec 18
2
segfault when trying to allocate a large vector
Dear R contributors, I'm running into trouble when trying to allocate some large (but in theory viable) vector in the context of C code bound to R through .Call(). Here is some sample code summarizing the problem: SEXP test() { int size = 10000000; double largevec[size]; memset(largevec, 0, size*sizeof(double)); return(R_NilValue); } If size if small enough (up to 10^6), everything is
2014 Dec 18
0
segfault when trying to allocate a large vector
Hi Pierrick, You're storing largevec on the stack, which is probably causing a stack overflow. Allocate largvec on the heap with malloc or one of the R memory allocation routines instead and it should work fine. Karl On Thu, Dec 18, 2014 at 12:00 AM, Pierrick Bruneau <pbruneau at gmail.com> wrote: > > Dear R contributors, > > I'm running into trouble when trying to allocate some large (but in > theory viable) vector in the context of C code bound to R through > .Call(). Here is some sample code summarizing the problem: > > SEXP test() { &gt...
2014 Dec 20
0
Unexplained difference between results of dppsv and dpotri LAPACK routines
This isn't the help list for LAPACK, but as far as I can tell, dppsv expects a symmetric matrix input compacted as triangular, not a Choleski decomposed one. So try assigning lmat before the call to dpotrf. -pd > On 20 Dec 2014, at 22:06 , Pierrick Bruneau <pbruneau at gmail.com> wrote: > > Dear R contributors, > > Considering the following sample C code, that illustrates two possible > uses of a Cholesky decomp for inverting a matrix, equally valid at > least in theory: > > SEXP test() { > > int d = 2; > int info = 0; &...
2013 Jan 31
1
Using eigen() for extracting only few major eigenpairs
Hi everyone, I am using eigen() to extract the 2 major eigenpairs from a large real square symmetric matrix. The procedure is already rather efficient, but becomes somehow slow for real time needs with moderately large matrices (few thousand lines). The R implementation statically extracts all eigenvalues (and optionally associated eigenvectors). I heard about optimizations of the eigen
2012 Sep 27
1
Problem with grid.rect
I have a stupid problem that is currently driving me crazy... Let us suppose that I want to draw a big red square in the middle of my current device (say X11) I tried the following code : pushViewport(viewport(xscale=c(0,1), yscale=c(0,1)), just=c("center", "center")) vp1 <- viewport(x=unit(0.5, "native"), y=unit(0.5, "native"), width=unit(0.4,
2012 Oct 10
1
Filling points in a trellis object
With the following code : I would like to plot 4 points, and have the circle and diamond shapes filled with grey. What am I missing ? Thanks by advance for your help, Pierrick Bruneau Research Fellow CRP Gabriel Lippmann -- View this message in context: http://r.789695.n4.nabble.com/Filling-points-in-a-trellis-object-tp4645679.html Sent from the R help mailing list archive at Nabble.com.
2012 Oct 10
1
impossible to fill point glyphs in a lattice plot
(sorry for repetition: the previous mail resulted from a weird manipulation in the forum) With the following code : dat1 <- matrix(nrow=4, ncol=2) dat1[1,] <- c(-2, 1) dat1[2,] <- c(-1.7, 0.9) dat1[3,] <- c(0.1, 0.6) dat1[4,] <- c(0.5, 0.5) theplot <- xyplot(V2 ~ V1, as.data.frame(dat1), pch=c(4,1,5,4)) plot(theplot, prefix="theplot") # for a predictable name
2012 Nov 04
1
Rd2pdf freeze
Hi everyone, >From the currently available version of the package VBmix, I would like to retrieve the intermediate .tex file that generates the VBmix-manual.pdf file. Formerly, running R CMD check with --no-clean allowed to get this tex source from a hidden directory : this feature was removed, but can apparently still be accessed through R CMD Rd2pdf --no-clean. Surprisingly, while the
2014 Dec 11
2
Fwd: No source view when using gdb
Dear R contributors, Say I want to debug some C code invoked through .Call() - say "varbayes" in the VBmix package. following the instructions in "Writing R Extensions", I perform the following actions : R -d gdb run library(VBmix) CTRL+C break varbayes signal 0 mod <- varbayes(as.matrix(iris)[,1:4], 2) The breakpoint is indeed activated, seemingly at the correct position
2013 Mar 08
2
Unexpected behaviour of apply()
Hello everyone, Considering the following code sample : ---- indexes <- function(vec) { vec <- which(vec==TRUE) return(vec) } mat <- matrix(FALSE, nrow=10, ncol=10) mat[1,3] <- mat[3,1] <- TRUE ---- Issuing apply(mat, 1, indexes) returns a 10-cell list, as expected. Now if I do: ---- mat[1,3] <- mat[3,1] <- FALSE apply(mat, 1, indexes) ---- I would expect a