similar to: lattice: par.settings with standard.theme() + additional arguments?

Displaying 20 results from an estimated 10000 matches similar to: "lattice: par.settings with standard.theme() + additional arguments?"

2010 Nov 26
3
lattice: strange behavior (?) when using trellis.device(color=FALSE)
Dear expeRts, I am not sure if I found a bug... I would like to create a function that itself creates a lattice plot without colors. Following http://www.mail-archive.com/r-help at r-project.org/msg64699.html I use trellis.device() to set the colors to FALSE. Whenever I call the minimal example below *with* trellis.device(), Quartz opens a window (I am working on a MAC), which it shouldn't,
2011 Apr 18
4
splom, plotmath: how to add three lines of information with alignment?
Dear expeRts, I would like to create a scatter plot matrix with splom(). The lower panel should contain some additional information about the samples shown in the upper panel plot, see the splom() call below. Now two questions came up: (1) The lower panels show "tau" and "alpha" on top of each other. How can I plot *three* expressions on top of each other? I tried several
2011 Jun 02
2
lattice + plotmath: how to get a variable in bold face?
Dear all, How can I get a bold "1000" in the title? I would like to use a variable (as opposed to putting in "1000" directly). library(lattice) N <- 1000 xyplot(0~0, xlab.top=list(label=as.expression(bquote(bold("foo" ~ .(N) ~ "bar"))), font=2, cex=1.2)) ## => "font=2" is ignored (of course) Cheers, Marius
2008 Jan 01
2
Alignment and Labeling of a color key in a xyplot?
Happy New Year to all R users! I have two short questions concerning a xyplot with a color key: 1) How do I properly place (align) the color key beside the xyplot? As you can see from the code listed below, the placement of the color key is not correct. I would like the upper and lower end point of the color key to be perfectly aligned with the upper and lower line of the xyplot. Adjusting
2010 Jun 23
1
how to print a colored plot in black/white?
Dear expeRts, shouldn't this... x <- 1:10 myplot <- xyplot(x~x,col="red") trellis.device(postscript,color=FALSE,file="plot.ps") print(myplot) dev.off() ... give a black/white plot? Cheers, Marius
2010 Dec 22
3
How to integrate a function with additional argument being a vector or matrix?
Dear expeRts, I somehow don't see why the following does not work: integrand <- function(x, vec, mat, val) 1 # dummy return value A <- matrix(runif(16), ncol = 4) u <- c(0.4, 0.1, 0.2, 0.3) integrand(0.3, u, A, 4) integrate(integrand, lower = 0, upper = 1, vec = u, mat = A, val = 4) I would like to integrate a function ("integrand") which gets an "x" value (the
2010 Dec 26
1
lattice splom: how to adjust space between tick marks and tick labels?
Dear expeRts, how can I decrease the space between the tick marks and the corresponding labels in an splom? See here: library(lattice) U <- matrix(runif(4000), ncol = 8) splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and tick marks is/seems to be too large I checked ?panel.pairs but could not find an option for that. Cheers, Marius
2011 Apr 06
7
Quiz: Who finds the nicest form of X_1^\prime?
Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=expression(italic(X[1]*minute))) plot(0,0,main=expression(italic(X)[1]*minute)) Any suggestions? Cheers, Marius
2010 Nov 13
3
How to set an argument such that a function treats it as missing?
Dear expeRts, I would like to call a function f from a function g with or without an argument. I use missing() to check if the argument is given. If it is not given, can I set it to anything such that the following function call (to f) behaves as if the argument isn't given? It's probably best described by a minimal example (see below). The reason why I want to do this is, that I do
2010 Dec 29
2
How to create an array of lists of multiple components?
Hi, how can I create an array of lists of three components? This approach does not work: n1 <- 2 n2 <- 4 n3 <- 5 res <- array(rep(vector("list",3), n1*n2*n3), dim = c(n1,n2,n3)) res[1,1,1] # is not a list with three components... The goal is that res[1,1,1] is a list with three components. Also, appending the components didn't work. For example, I tried: component
2010 Dec 30
1
latex() etc.: How to nicely format a matrix for a LaTeX document?
Dear (T)eXpeRts, I try to create a LaTeX table from an R matrix for the first time. I am not sure what the "best" approach is, I just read about latex() from Hmisc (toLatex() didn't work). Consider the following minimal example: library(Hmisc) mat <- matrix(c(1,NA,3,100,10000,4), ncol = 3, byrow = TRUE) latex(mat, file = "", booktabs = TRUE, numeric.dollar = FALSE,
2011 Jun 02
2
plotmath: paste string and expression [from a vector of expressions]
Dear all, I have a vector of expressions and would like to "paste" some string to it before using it in a plot: vars <- vector("expression", 2) vars[1] <- expression(alpha) vars[2] <- expression(beta) plot(0, 0, main=substitute(bold("Foo" ~~ VAR), list(VAR=vars[2]) )) Although I tried hard, I just can't figure out how to solve this. The title should be
2015 Feb 03
2
Seed in 'parallel' vignette
Hi, This is most likely only a minor technicality, but I saw the following: On page 6 of the 'parallel' vignette (http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf), the random-number generator "L'Ecuyer-CMRG" is said to have seed "(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer et al. (2002), the seed is given with
2016 May 05
4
R process killed when allocating too large matrix (Mac OS X)
Hi Simon, thanks for your quick reply. 1) ... so you can reproduce this? 2) Do you know a way how this can be 'foreseen'? We allocate larger matrices in the copula package depending on the user's input dimension. It would be good to tell her/him "Your dimension is quite large. Be aware of killers in your neighborhood"... before the killer attacks. Thanks & cheers,
2006 May 29
3
mtext in trellis-loop & colorkey
Hello, I would like to create a sequence of plots (using a for loop). I read in the FAQ that print() has to be used in order to obtain any output. This works perfectly fine as long as I only consider one function call in the loop, but I would like to add mtext() to the each plot in the loop. Unfortunately, this did not work. Any suggestions? As you can see from the provided example,
2010 Dec 21
1
How to suppress plotting for "xyplot(zoo(x))"?
Hi, I found the thread http://r.789695.n4.nabble.com/Matrix-as-input-to-xyplot-lattice-proper-extended-formula-syntax-td896948.html I used Gabor's approach and then tried to assign the plot to a variable (see below). But a Quartz device is opened... why? I don't want to have anything plot/printed, I just would like to store the plot object. Is there something like "plot =
2011 Jun 02
1
[R-SIG-Mac] check leads to .o files and to packagename-Ex.R
On 06/02/2011 06:47 AM, Benilton Carvalho wrote: > 'R CMD check' should be applied on the .tar.gz, not on the source directory. Why? The help says: "Check R packages from package sources, which can be directories or package 'tar' archives with extension '.tar.gz', '.tar.bz2' or '.tgz'." I just skimmed through the relevant section (1.3.1) in
2011 Jul 08
1
lattice: How to vertically adjust an axis label?
Dear expeRts, How can I vertically adjust an axis tick label so that it is nicely aligned with the other labels? library(lattice) xyplot(0~0, xlim=c(0,3), scales=list(x=list(at=c(1,1.1), labels=c(expression(hat(theta)[italic(n)]),expression(theta))))) ## aim: move the leftmost expression up so that theta is nicely aligned with the second theta. Cheers, Marius
2016 May 05
1
R process killed when allocating too large matrix (Mac OS X)
Hi, Interesting "feature" in 10.11.4. I wonder if the process is killed before or after malloc() returns. If before, it seems very blunt: "You're asking too much and I don't like it so I kill you now". If after it doesn't look much better: "You're asking a lot and I don't like it but I give it to you anyway. I'll kill you quickly later". Why
2010 Dec 30
5
Why is format(10000, big.mark = "\\,") not 10\,000?
Hi, why does format(10000, big.mark = "\\,") not give me "10\,000"? How can I get this kind of "big.mark"? Cheers, Marius