search for: m_hofert

Displaying 20 results from an estimated 58 matches for "m_hofert".

Did you mean: hofert
2006 Feb 12
1
contour lines for levelplot
..."contour=TRUE" in the levelplot call) at specified points? Is it possible to tell the levelplot function (with cuts=99) to plot a specified number of contour lines (say, only to plot 10 contour lines in the whole existing range of z- values)? Thank you very much in advance Marius m_hofert at web.de example code: remove(list=objects()) x.1<-rep(seq(0,1,by=0.04),each=26) x.2 <- 0.04*(0:25) y.1<-rep(x.2,26) y.2 <- 0.04*(0:25) z.1 <-x.1*y.1 z.2<- matrix(unlist(z.1),ncol=26,byrow=TRUE) library(lattice) #for trellis-like graphical plots plot.new() levelplot(z.1~x.1*y.1...
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
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,
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
2011 Jun 02
1
[R-SIG-Mac] check leads to .o files and to packagename-Ex.R
...ls being preferred. Add my vote to the wishlist that the src directory should get cleaned after R CMD check. Ben Bolker > > So, it'd be something like: > > R CMD build pkg > R CMD check pkg_version.tar.gz > > b > > On 2 June 2011 06:54, Marius Hofert <m_hofert at web.de> wrote: >> Dear expeRts, >> >> I work on the R package "nacopula" (https://r-forge.r-project.org/projects/nacopula/) under Mac OS X 10.6.7 (MacBook Pro). The session info is: >> R version 2.14.0 Under development (unstable) (2011-05-02 r55730) >>...
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
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
2006 Mar 04
1
Wireframe: Labels parallel to axes?
Hi, I would like to have the labels parallel to the axes in my wireframe (lattice) plot. Sure you can use ...xlab=list(label="x-axis",rot=30) and for the z-axis this is easy (as rot=90), but for the x- and y- axis the angle is not (always) quite clear (to me). Is there an option that just rotates all three labels to be parallel to the corresponding axes? Thanks marius
2006 Mar 04
1
xyplot/levelplot: thickness of tickmarks
Hi, if I use the xyplot (or levelplot) function (lattice library) with the option axs="i", I have the problem that the tickmarks lie a bit outside the "plot-box". Consider for example: library(lattice) x<-seq(0,1,by=0.01) y<-seq(0,1,by=0.01) xyplot(y~x,type="l",xlim=c(0,1),ylim=c(0,1),scales=list
2007 May 20
0
Testing multidimensional random numbers?
...(often called 'probability integral transform') is also not known. Is there a simple way (or any way) to test such a prng? Most papers I found deal with the standard uniform case, which is of course easy to test (Kolmogorov-Smirnov, Anderson-Darling, ...). Thanks in advance! Marius m_hofert at web.de PS: Sorry, this question is not directly related to R, but I hope you can help me anyway.
2009 Oct 24
1
dev.copy(postscript,...) generates a disrupted string
Dear R-Users, I have the following problem: I would like to create a postscript file containing an r-plot with the string "\\vartheta" in it (reason: this is later converted to the TeX-string "\vartheta" and a vartheta is printed in the figure). In the minimal example below, the problem is that the created postscript file does _not_ contain the string "\\vartheta
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 Nov 26
1
How to use expression(italic()) in a "vectorized" way (within a function)?
Dear expeRts, I would like to use expression() for creating labels in a splom, as shown in the first minimal example below. Is there any way I can simplify having to write "expression(italic(...))" several times? The second example is what I tried so far, but I can't manage to get italic() to work. Moreover, it still seems bulky... Cheers, Marius ## minimal example (working but
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 May 11
1
foreach(): how to do calculations "between" two foreach loops?
Dear expeRts, is it possible to carry out calculations between different foreach() calls? As for nested loops, you want to carry out calcuations not depending on the inner loop only once and not for each iteration of the innermost loop. Cheers, Marius library(foreach) foreach(i=1:3) %:% foreach(j=1:2) %do% { i <- i+1 print(paste(i,j)) } foreach(i=1:3) %:% i
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
2011 May 27
0
RE How to convert an ftable object to a matrix including the row names?
Okay, great, thanks :-) Marius On 2011-05-27, at 10:56 , david.hajage at curie.net wrote: > > Hi, > > Is this what you want ? > > ft <- ftable(Titanic, row.vars=1:3) > xtable(format(ft)) > > Best, > > david > > > Marius Hofert <m_hofert at web.de> > Envoy? par : r-help-bounces at r-project.org > 27/05/2011 07:41 > > A > Help R <r-help at stat.math.ethz.ch> > cc > Objet > [R] How to convert an ftable object to a matrix including the row names? > > > > > > Dear expeRts...
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
2006 Mar 04
1
Controlling (number of) wires in wireframe
Hi, I would like to plot a wireframe (library: lattice) of the function f (x,y)=x*y where x and y are equally evaluated between 0 and 1. When one uses the option drape=TRUE then each "square" between the "wires" (lines that build the surface shape) gets a certain color. A perfect wireframe plot of a continuous surface would be, if you (almost) can not distinguish
2008 Sep 21
1
How to put given values in lower triangle of splom-plot?
Dear R-experts, I have found a splom-modification online which is given below. This works perfectly, but I would like to have a matrix of given correlation values to be used in the lower triangular part (lower.panel) of the splom-plot instead of calculated correlation values. Here is the matrix I would like to use (it can be any other convenient data structure):