similar to: Problem with grid.rect

Displaying 20 results from an estimated 1100 matches similar to: "Problem with grid.rect"

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 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
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.
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 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]
2008 Aug 06
1
grid layout scaling viewport width based solely on height
Hello all, I'm trying to write a function that produces a main plotting region with several square plots along the right side. Ideally the size of right side plots will scale only with the height of the entire plot, yet never overlap with another secondary plot. The following two snippets get close, however, as I resize the plot horizontally the right side plots (green squares) get smaller
2013 Mar 20
1
help on extracting values from a matrix
Dear All,   any thoughts on how I can do the following:   let us say we have:   a <-c(2,4,16,28,48) b <-c(10,4,2,0.4,0.03) d <-cbind(a,b)   what I would like to do is to extract values of column b in the matrix based on the corresponding values of column a. For example: I would like to extract all b values that have a corresponding a value that is less than 24 into a numeric vector, so
2013 Mar 20
2
problem subsetting data.frame in R version 2.15.2 for Windows
Good day. I create a data frame like this: > data <- data.frame(a=1:10,b=11:20,c=21:30) I can subset this data.frame by saying: > data[data$a>7,] and I get this result a b c 8 8 18 28 9 9 19 29 10 10 20 30 I understand I should get the same result by saying
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
2009 Mar 21
1
Forestplot () box size question
Hi All, I have been able to modify the x-axis to start at zero by adding xlow and xhigh parameters; that was pretty simple. I have been unable to find the location of the code that would turn off the information weighting of the box size (I have smaller randomized trials getting less weight than a much larger non-randomized trial). The function is forestplot() from rmeta. Thanks for any
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 20
3
highlight overlapping region of two densities
Hi all. I would like to highlight overlapping regions of two densities and I could not find a way to do it. Here is the sample code: myd <- c(2,4,5, 4,3,2,2,3,3,3,2,3,3,4,2,4,3,3,3,2,2.5, 2, 3,3, 2.3, 3, 3, 2, 3) myd1 <- myd-2 plot(range(density(myd)$x, density(myd1)$x), range(density(myd)$y, density(myd1)$y), type = "n") lines(density(myd), col=1, lwd=4)
2009 Jul 21
2
animated grid graphics
I need to make a fairly complex animated graphic and decided to use grid for it. A very simple example of what I need: ##============================================================================== library(grid) grid.newpage() pushViewport(plotViewport()) pushViewport(viewport(xscale = extendrange(c(0, 100)), yscale = extendrange(c(0, 100)))) grid.xaxis() grid.yaxis()
2006 Apr 06
2
key position in trellis plotting area
Hi, I want to do the following: 1) create a trellis plot with 1 x 1 layout 2) add a key in the upper right hand corner of the plotting region (i.e., the panel), but after the initial call to trellis 3) resize the resulting device graphics device without changing the relative position of the key For instance, the code below draws the key relative to the device window--not the plotting area.
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
2007 May 30
3
sizing and saving graphics in R
Dear R wizards, I am seeking advice on graphics in R. Specifically, how to manipulate the size and save a plot I have produced using the LDheatmap library. I confess I am relatively new to graphics in R, but I would greatly appreciate any suggestions you may have. LDheatmap produces a coloured triangular matrix of pairwise associations between 600 genetic markers in my dataset.
2006 Jun 12
1
strange behaviour with rotated viewports in grid
Dear all, I am having a problem using grid when rotating a viewport. It seems to plot everything on a grey background colour which I am not able to get rid of. Even book examples such as that that plot figure 5.10 in P. Murrell's R Graphics book show the same behaviour. The following example illustrates this issue. I would appreciate if anyone has a way to solve this. Best regards,
2007 Jun 28
1
Changing graphics height when using grid and lattice
Hi, I have recently been playing with the grid package in an attempt to create some pages containing multiple lattice plots on the same page. However, when I specify a grid layout with different widths, such as: pushViewport(viewport(layout = grid.layout(1, 2, unit(c(2, 1), "null")))) the individual graphs do not end up as the same height - which is a feature I would prefer to have.
2006 May 11
1
Bug in viewport handling?
Hi, Is the following an (unknown) bug? Rhythmbox (RB) has an option for using a icon-tray. Restoring/minimizing to the tray in combination with switching viewports (VP) seems to confuse compiz. Steps to reproduce: 1. Start RB on VP1. 2. Minimize to tray. 3. Change to VP2. 4. Click the tray icon to restore. Result: RB is restored to VP2, while compiz changes to VP1. Subsequent clicking on the
2008 Mar 08
1
ask for help on nonlinear fitting
I have a table like the following. I want to fit Cm to Vm like this: Cm ~ Cl+Q1*b1*38.67*exp(-b1*(Vm-Vp1)*0.03867)/(1+exp(-b1*(Vm-Vp1)*0.03867))^2+Q2*b2*38.67*exp(-b2*(Vm-Vp2)*0.03867)/(1+exp(-b2*(Vm-Vp2)*0.03867))^2 I use nls, with start=list(Q1=2e-3, b1=1, Vp1=-25, Q2=3e-3, b2=1, Vp2=200). But I always get 'singlular gradient' error like this. But in SigmaPlot I can get the result. How